Tag Archive for 'merge'

Subversion Tip of the Week

Tagging and Branching with SmartSVN’s ‘Copy Within Repository’

SmartSVN’s ‘Copy Within Repository’ command allows users to perform pure repository copies, which is particularly useful for quickly creating tags and branches.

To create a repository copy within SmartSVN:

1) Open the ‘Modify’ menu and select ‘Copy within Repository’.

2) From the ‘Copy From’ dropdown menu, select the repository where the source resides.

3) In the ‘Copy From’ textbox, specify the directory being copied. In ‘Source Revision,’ tell SmartSVN whether it should copy the HEAD revision (this is selected by default) or a different revision. Use the ‘Browse’ button if you need more information about the contents of the different directories and/or revisions that make up your project.

copy within repo

4) Select either:

  • Copy To – source is copied into the ‘Directory’ under the filename specified by ‘With Name’

  • Copy Contents Into – the contents of the source are copied directly into the ‘Directory’ under ‘With Name.’

5) Enter the copy’s destination in the ‘Directory’ textbox. You can view the available options by clicking the ‘Browse’ button.

6) Give your copy a name in the ‘With Name’ textbox.

7) The copy is performed directly in the repository, so you’ll need to enter an appropriate commit message.

8) Once you’re happy with the information you’ve entered, hit ‘Copy’ to create your new branch/tag.

Try SmartSVN Professional free today! Get a free trial at http://www.smartsvn.com/download.

Subversion Tip of the Week

SmartSVN’s Project Settings Menu 

SmartSVN’s ‘global preferences’ is a method of specifying settings across all your SmartSVN projects for efficiency and simplicity. However, sometimes you need to change settings for a single project, which is where the ‘Project Settings’ menu comes in handy.

In this week’s tip, we’ll look at some of the SmartSVN settings you can apply using this menu.

Accessing Project Settings

To access SmartSVN’s Project Settings, open the ‘Project’ menu and select ‘Settings.’ The different options are listed on the dialog box’s left-hand side.

project settings

1) Text File Encoding

This affects how file contents are presented. Choose from:

  • Use system’s default encoding – SmartSVN uses the system’s encoding when displaying files. This is the default setting for SmartSVN.

  • Use the following encoding – Select your own encoding from the dropdown menu. This is useful if you’re dealing with international characters, which may otherwise be encoded incorrectly.

Note, if you’ve specified a file type using the MIME-Type property, SmartSVN will choose this over the text file encoding settings.

2) Refresh/Scan

SmartSVN can either scan the ‘whole project’ or the ‘root directory only’ when you open a project. In most instances, you’ll want to scan the entire project, but if you’re working with particularly large repositories, the ‘root directory only’ option can speed up this initial scan and avoid high memory consumption.

3) Working Copy

Clicking on ‘Working Copy’ presents you with several checkboxes:

working copy

  • (Re)set to Commit-Times after manipulating local files – tells SmartSVN to always use a local file’s internal Apache Subversion property commit-time. This is useful for ensuring consistency across timezones, and between clients and the Subversion repository.

  • Apply auto-props from SVN ‘config’ file to added files – tells SmartSVN to use the auto-props from the SVN ‘config’ file. With auto-props enabled, you can perform tasks such as automatically inserting keywords into text files and ensuring every file has EOLs that are consistent with the operating system. Not only are auto-props a time-saving feature, but they can help you avoid human error within your project.

  • Keep input files after merging (monitored merge) – tells SmartSVN to always keep the .aux files following a merge, even for non-conflicting files. These files are stored in the ‘merged’ state and can be used to gain a deeper insight into what has changed during the merge.

4) Locks

Apache Subversion is built around a ‘copy-modify-merge’ model, but there are times when a ‘lock-modify-unlock’ model may be appropriate, for example when you’re working on image files, which cannot easily be merged. SmartSVN has full support for locking and unlocking files, but if you’re going to make heavy use of locks, you can configure SmartSVN to automatically flag certain files as requiring locking before anyone begins working on them. This is a useful reminder, especially if your project contains multiple non-mergeable files. Open the ‘Lock’ section of the Project Settings dialog and select either ‘all binary files’ or ‘every file,’ if required. The default is ‘no file.’

You can also choose whether SmartSVN should suggest releasing or keeping locks whenever you perform a commit, which is a helpful reminder if your team are working with multiple locks. Finally, the ‘Automatically scan for locks’ option tells SmartSVN to scan for locked files at specified intervals.

Find out more about locks by reading our ‘Locking and Unlocking in SmartSVN’ blog post.

5) Conflicts

When SmartSVN encounters conflicts, it adds new extensions to the conflicting files to help distinguish between them. By default, SmartSVN will take its cues from the config file, but if you want to specify particular extensions, you can select ‘Use following extensions’ and type the desired extensions into the textbox.

Remember, you can download your free edition of SmartSVN Professional at www.smartsvn.com/download

Performing a Reverse Merge in SmartSVN

Apache Subversion remembers every change committed to the repository, making it possible to revert to previous revisions of your project. Users of SmartSVN, the cross-platform client for SVN, can easily perform a revert using the built-in ‘Transactions’ window.

Simply right-click on the revision you wish to revert to in SmartSVN’s ‘Transactions’ window (by default, this window is located in the bottom right-hand corner of your SmartSVN screen) and select ‘Rollback.’

smartsvn transactions

Alternatively, reverse merges can be performed through the ‘Merge’ dialogue:

1) Select ‘Merge’ from SmartSVN’s ‘Modify’ menu.

2) In the Merge dialogue, enter the revision number you’re reverting to.

merge changes from a diff branch

If you’re not sure of the revision you should be targeting, click the ‘Select…’ button next to the ‘Revision Range’ textbox. In the subsequent dialogue, you can review information about the different revisions, including the commit message, author and the timestamp of the commit.

select a revision

3) Ensure ‘Reverse merge’ is selected and click ‘Merge.’

4) Remember to commit the reverse merge to the repository to share this change with the rest of your team!

Remember, you can claim your 30 day free trial of SmartSVN Professional now.

What’s New in SmartSVN 7.5.4?

The latest release of SmartSVN, the cross-platform graphical client for Apache Subversion, features plenty of improvements you will find useful. In this post, we take a closer look at some of the functionality we’ve added to SmartSVN 7.5.4.

–ignore-ancestry

SmartSVN’s ‘switch’ option allows users to update a working copy to a different URL. This is particularly useful when you need to update your working copy to mirror a newly created branch. SmartSVN 7.5.4 adds support for the –ignore-ancestry option, which forces SmartSVN to switch to a URL even when it cannot find a common ancestor for the URL and your working copy.

JIRA Fixes

SmartSVN supports the popular JIRA issue tracker through its ‘Bugtraq’ properties option, allowing users to seamlessly integrate JIRA into the commit wizard and other modules. SmartSVN 7.5.4 fixes an internal error that could close the ‘Resolve’ dialogue, ensuring that SmartSVN’s JIRA integration continues to run smoothly.

Shell Integration Updates

In addition to being available as a standalone program, SmartSVN integrates with Windows Explorer and Mac OS X Finder, giving you the freedom to work the way you want. SmartSVN 7.5.4 includes fixes and new functionality for this integration, including:

  • Settings for shell integration are now stored

  • A fix for an internal error that could occur when working with root-level working copies (Windows)

  • A fix for a bug that could cause commands to be erroneously enabled (Windows)

Transactions

The Transactions view automatically provides information about new project revisions, ensuring users are kept up-to-date with changes being committed to the repository. If you’re using SmartSVN Professional, this Transactions window can watch for commits in any repository, keeping you informed on changes in the libraries being used by your project, or about the Subversion-related activities of your entire team.

transactions

SmartSVN 7.5.4 addresses a bug that could cause the ‘Copy Revision Number’ command to copy multiple items.

Additional Fixes

SmartSVN 7.5.4 also includes fixes for:

  • An internal error in the Merge Preview

  • An error in the SmartSVN Log that could occur when loading merged revisions

  • The “smartsvn.defaultConnectionLogging” system property failing to work

  • Trac plugin failing when querying Trac ticket db

More information on what’s new and noteworthy in this release is available at the Changelog.

Haven’t started with SmartSVN? You can claim a free trial of SmartSVN Professional 7.5.4 now.

 

Fetching Previous Revisions in Subversion

One of the fundamental features of Apache Subversion is that it remembers every change committed to the central repository, allowing users to easily recover previous versions of their project.

There are several methods available to users who wish to roll back to an earlier revision:

1) Perform a Checkout

By default, Subversion checks out the head revision, but you can instruct it to checkout a previous revision by adding a revision number to your command:

svn checkout -r(revision-number) (repository-URL)

In this example, we’re creating a working copy from the repository data in revision 5.

checking out revision 5

2) ‘Update’ to Previous Revision

If you already have a working copy, you can ‘update’ it to a previous revision by using ‘svn update’ and specifying the revision number:

svn update -r(revision-number) (working-copy-location)

In this example, we’re updating the ‘Project’ working copy to revision 5.

svn update to past revision

3) Perform a Reverse Merge

Alternatively, you can perform a reverse merge on your working copy. Usually, a reverse merge is followed by an svn commit, which sends the previous revision to the repository. This effectively rolls the project back to an earlier version and is useful if recent commit(s) contain errors or features you need to remove.

To perform a reverse merge, run:

svn merge -r(revision-to-be-merged):(target-revision) (working-copy-URL)

svn reverse merge

Looking for an easy-to-use cross platform Subversion client? Claim your free 30 day trial of SmartSVN Professional by visiting: www.smartsvn.com/download

Intro to SmartSVN’s Revision Graph

SmartSVN’s built-in Revision Graph tool provides a quick and easy way to get an overview of the hierarchical history of your files and directories. This history is primarily represented as ‘nodes’ and ‘branches.’ (Note, because the Revision Graph displays branches and tags, the Tag-Branch-Layout must be configured correctly.)

The Revision Graph is useful for seeing at a glance:

  • Merged revisions
  • Revisions that have yet to be merged
  • Whether a merge occurred in the selected revision
  • Which changes happened in which branch
  • Which revision represents which tag
  • When a file was moved, renamed or copied, along with its history

To access the Revision Graph, open SmartSVN’s ‘Query’ menu and select ‘Revision Graph.’

revision graph 2

This will open the main Revision Graph screen.

revision-graph

The main section of the Revision Graph is the ‘Revisions’ pane. This displays the parent-child relationships between your revisions. Revisions are arranged by date, with the newest at the top.

In the Revision Graph, there are four main types of relationships that are represented by different line styles:

  • Normal parent-child relationship – represented by thick, coloured lines.
  • Complete merge relationship – created by performing a merge commit where all the source revisions are merged into the target. When ‘Merge Arrows’ is enabled, it is represented by thin, coloured lines.
  • Partial merge relationship – created by performing a partial merge (cherry-pick) where not all source revisions are merged into the target. When ‘Merge Arrows’ is enabled it’s represented by thin, coloured, dashed lines.
  • URL relationship – this is where branches have the same URL, but are not related (e.g when you have removed and re-added a branch.) When ‘Join Same Locations’ is enabled, this is represented by thin, gray lines.

In addition to the main ‘Revisions’ pane, the SmartSVN Revision Graph includes several additional views:

1) Revision Info – displays attributes of the selected revision (revision number, date, state, author who created the revision etc.)

revision info

2) Directories and files – displays the files that were modified as part of the selected revision.

revision graph 3

From this screen, you can access several additional options:

  • Export – export the Revision Graph as an HTML file by selecting ‘Export as HTML…’ from the ‘Graph’ menu. In the recently-released SmartSVN 7.5, this export function was improved to support exporting smaller HTML graphic files.
  • Merge Arrows – select the ‘Show Merge Arrows’ option from the ‘Query’ menu to display the merge arrows. These point from the merge source to the merge target revisions. If the merge source is a range of revisions, the corresponding revisions will be surrounded by a bracket.
  • Merge Sources – select the ‘Show Merge Sources’ option from the ‘Query’ menu to see which revisions have been merged into the currently selected target revision.

Haven’t yet started with SmartSVN? You can claim your free SmartSVN Professional trial by visiting www.smartsvn.com/download

WANdisco Launches Enterprise Subversion Training On-Demand

If you’ve ever attended our Enterprise Training sessions, which are delivered by our SVN experts at a place and time to suit you, you’ll know that we’re dedicated to making it easy for Enterprises to get the information, best practices and practical, hands-on experience they need to get the most out of the world’s most popular version control system. So, we’re excited to announce a brand new series of enterprise-class, on-demand Subversion training that makes it easier than ever to get the training you need.

Designed with the enterprise in mind, our step-by-step video modules cover all the crucial SVN topics, including:

  • Basic Operations and Command Line
  • Handling Merge Conflicts
  • Advanced Repository Management
  • SVN Changelists
  • Hook Scripts
  • and more!

Each class is delivered as an on-demand, 30 minute video, which can be watched within our Video Streaming Platform or delivered as a SCORM compliant SCO file for onward integration into your LMS. The content is provided in an interactive slide presentation at an easy-to-follow pace, with visual indications to highlight where specific topics stop and start. We can also provide quiz questions as part of the training, so you can test your progress.

Sign up before December 15th, to claim one month of Subversion eTraining for free, with a 6 month agreement, or 3 months free with a 12 month agreement. Visit our Subversion eTraining page now to request a quote, or to view the complete course list.

Top 5 Reasons To Try SmartSVN

SmartSVN is WANdisco’s powerful graphical client for Apache Subversion. In this post, we run through our top five reasons to try SmartSVN.

1) It’s Cross Platform

SmartSVN runs on Windows, Linux and Mac OS X, so you can continue to work with your operating system of choice. SmartSVN also offers comprehensive support for all of these operating systems – it integrates with Windows Explorer, and can be started as a background process on Windows and Linux.

SmartSVN integrated with Windows Explorer.

For Apple users, SmartSVN leverages the dock icon to automatically notify users of new transactions, and provides a Finder integration (Mac OS X 10.5).

2) Everything you need, out of the box!

SmartSVN comes complete with all the tools you need to manage your Subversion repositories:

  • Conflict Solver

Conflicts can be tricky for Apache Subversion users, but SmartSVN comes with a dedicated ‘Conflict Solver’ that takes the pain out of resolving them. SmartSVN’s built-in Conflict Solver combines the freedom of a general, three-way-merge with the ability to detect and resolve any conflicts that occur during the development lifecycle.

To access this conflict solver, open the ‘Query’ menu and select ‘Conflict solver.’

In the ‘Mark Resolved’ dialog, you can opt to:

  1. Leave the file/directory as it is.
  2. Accept the version in the working copy, as it was before the update or merge was performed.
  3. Accept the new version – the pristine copy after the update or merge was performed.
  4. Accept the old version – the pristine copy before the update or merge was performed.
  • File Compare

SmartSVN provides file-compare out of the box, combining the ability to compare with inner-line comparisons and the ability to edit the compared files directly.

The ‘File Compare’ option can be easily accessed through the ‘Show Changes’ option in the ‘Query’ menu.

  • Built in SSH Client

SmartSVN’s powerful SSH client allows users to access servers using the SSH protocol. This security-conscious protocol encrypts every piece of communication between the client and the server.

3) See the state of your files/directories at a glance

In the project directory you can see at a glance which directories contain local modifications (red arrows) and which directories have been changed in the repository (green arrows.)

Furthermore, you can easily see whether each file has been modified locally and whether it has been modified in the repository:

4) Optimized Interface

SmartSVN’s interface has been designed to give users an optimal view of their project’s state. This includes:

  • Placing the most ‘important’ files (such as conflicting, modified or missing files) at the top of the file list.
  • See at a glance which directories contain local modifications, which directories have been changed in the repositories, and whether individual files have been modified locally and modified in the repository.
  • Displaying all files – even files that don’t exist locally, or currently only exist in the repository. This is beyond the scope of many Apache Subversion clients.
  • Customize the displayed file information according to your needs.

5) Excellent Merge Support

SmartSVN’s xMerge add-on can take the pain out of merging moved and renamed files. xMerge analyzes the repository’s history and identifies files in the merge source and the merge target using Subversion’s copy-from information. This ensures that files can be located and correctly identified, even after they have been moved and/or renamed. This functionality also preserves a file’s log history with greater accuracy, even when a file has been moved and renamed before being merged.

Find out more about the xMerge add-on http://www.smartsvn.com/xmerge-addon

Ready to get started with SmartSVN? Download your free, 30 day free trial of SmartSVN Professional http://smartsvn.com/evaluate

Subversion Live 2012: Branching and Merging

Branching and merging is one of the issues Apache Subversion users seem to encounter the most issues with, and with that in mind we designed the Subversion Live 2012 programme to include plenty of best practices, tips and tricks on branching and merging.

Subversion Live 2012 attendees had the opportunity to attend two breakout sessions on branching and merging during the second day of the conference. The first breakout, ‘Branching and Merging Best Practices’ was conducted by WANdisco’s Director of Subversion Training, Mike Lester.

Mike’s session covered essential know-how for mastering branching and merging in Subversion, including factors that should be taken into account when planning your branching strategy, such as how to handle releases and bug fixes, and what changes require a branch. Mike advised that these decisions should be clearly laid out in a Policies and Procedures document.

He also shared some best practices for tracking branch usage, which included controlling where branches can be created and implementing a clear naming convention for your branches. On the merge tracking side of things, he explained how svn mergeinfo can be used to track merges.

Mike Lester’s session concluded with a Q and A session, where attendees had the opportunity to share their own branching and merging strategies, and get feedback from both Mike Lester and the other attendees.

After lunch, delegates had the opportunity to attend a ‘Merge and Performance Improvements’ session, led by Julian Foad. Julian is the lead developer for enhancements to Subversion’s merge capabilities at WANdisco, and his session delved into greater depth regarding the upcoming reintegrate merge overhaul in Subversion 1.8.

Julian explained that in Subversion 1.8, users will no longer have to specify that they are performing a reintegrate merge. This will make merging quicker, easier and less error-prone than in previous releases.

In Subversion 1.8, a branch will no longer become redundant after a reintegrate merge has been performed, so developers will be able to continue using the branch.

Julian also went into detail about how these merge changes will impact the SVN help command, essentially making the ‘svn help merge’ output more concise.

Read all about Subversion Live 2012, with our recaps of Day One and Day Two, and an in-depth look at the Subversion Live Keynote and the What’s Coming in SVN 1.8: Overview session. You can also check out Subversion Live 2012: Your Feedback to see what people are saying about the conference.

Subversion Live: What’s Coming in SVN 1.8?

Apache Subversion 1.8 is currently scheduled for release later this year, so it’s no surprise that Subversion Live London’s ‘What’s Coming in 1.8: Overview’ session drew a large crowd, especially as the session was conducted by core Subversion committers Julian Foad, Stefan Fuhrmann, Ben Reser and Philip Martin.

First, the committers covered what the community can expect from the 1.8 release process, and stressed the importance of community testing during the Release Candidate stage. “The Release Candidates are your opportunity to tell us about the bugs that really hurt you,” said Stefan.

The session then moved onto the new functionality that’s planned for this release, with an in-depth explanation of the following:

  • EV2 – a new framework for Subversion 1.8
  • Deltification improvements – the committers stressed that this will be particularly useful for people working on large repositories
  • A new benchmarking tool for identifying server and performance bottlenecks
  • Support for –include -externals in SVN Commit
  • SVN Merge improvements – users will no longer have to distinguish between a reintegrate merge and a sync merge
  • svn mergeinfo will include a summary diagram as the default output
  • revprop handling – improved handling during backup
  • A more interactive SVN Resolve command

  • Three new options for SVN Diff (–ignore-properties, –properties-only, and –patch-compatible)
  • A new password agent on UNIX
  • svnadmin freeze – this command will delay commits while other operations are performed on the repository. Throughout this process, the repository remains live. The committers revealed that this new feature was inspired by a conversation with an attendee at Subversion Live 2011.

Unsurprisingly, many attendees used the Q and A time at the end of the presentation to quiz the core committers on the finer details of the upcoming 1.8 release, especially the changes to inherited properties, pristine copies, reintegrate merges, and even Subversion’s bindings. The bindings question led to an invitation for the audience members to become Subversion committers themselves: “If the bindings are important to your business, send us a patch,” said Philip Martin.

Another topic of conversation during the Q and A section, was whether upgrading the working copy to 1.8 should be a manual or an automatic process. The general consensus among Subversion Live attendees seemed to be that it should be manual.

Attendees were also able to get advice from the committers on how to leverage Subversion 1.8’s features for their own individual use cases. In fact, there were so many questions that the next session was due to start before all the attendees’ questions were answered. Thankfully, all of the core committers were at Subversion Live throughout the last day (and were also available for more questioning during the Committer Roundtable session) giving attendees plenty of time to find out more about Subversion 1.8.

Read all about Subversion Live 2012, with our recaps of Day One and Day Two, and an in-depth look at the Subversion Live Keynote.