Merge Revisions

This is the case when you have made one or more changes to a branch and you want to duplicate them in a different branch. For example, we know that a problem has been fixed by committing revisions 17, 20, and 25 on branch B1. These changes are also needed in branch B2. Thus, in order to merge them, we need a working copy of the B2 branch.

To merge revisions from a different branch, follow these steps:

  1. Go to menu Tools > Merge.
    The Merge wizard is opened.
  2. Select the Merge revisions option.
  3. It is recommended that you enable the Perform pre-merge best practices checks of the working copy target option to make sure that the working copy target item is ready for the merge operation.
    1. Press the Next button.
      If the Perform pre-merge best practices checks of the working copy target option was enabled, the Pre-Merge Checks wizard page is displayed.
      Note: If errors are found you need to solve them before proceeding.
  4. Press the Next button.
    The Merge revisions wizard page is displayed.
  5. In the Merge from (URL) text box, enter the URL of the branch or tag that contain the changes that you want to duplicate in your working copy. In our example, it is the URL of the B1 branch.
    You may also click the Browse button to browse the repository and find the desired branch. If you have previously merged from this branch, then you can simply use the drop down list, which shows a history of previously used URLs.
    Note: If the URL belongs to a different repository than the working copy, the Ignore ancestry / Disable merge tracking option, in the Merge Options wizard page, will be enabled automatically (and you cannot change this). This is because the Subversion client cannot track changes between different repositories.
    Tip: You can also specify a peg revision at the end of the URL (for example, URL@rev1234). The peg revision does not affect the merge range you select. By default, the HEAD revision is assumed.
  6. In the Revisions to merge section, choose between the all revisions and specific revision(s) options.
    • all revisions - The operation will include all eligible revisions that were not yet merged.
    • specific revision(s) - You can specify one or more individual revisions and/or revision ranges. Also, you can mix forward ranges (for example, 1-5), backward ranges (for example, 20-15), and subtract specific revisions from a range (for example, 1-5, -3).
    Note: If using the Subversion command-line client, a revision range of the form 1-5 means all changes starting from revision 2 up to revision 5 (the changes necessary to reach revision 5, committed after revision 1). Unlike the Subversion command-line client, in Syncro SVN Client the revision ranges are inclusive, meaning that it will process all revisions, starting with revision 1, up to and including revision 5.
    Attention: The HEAD revision is the only non-numerical revision allowed, and it can only be used when specifying revision ranges as one of the ends of the range (for example, 10-HEAD). Be careful when using it, as it might not refer to the desired revision, if it has recently been committed by another user.
    Tip: If you want to perform a reverse merge and roll-back your working copy changes that have already been committed to the repository, use the negative revisions notation (for example, -7) or backward revision ranges (for example, 20-10).
    1. If you press the History button, the History dialog box is displayed, which allows you to select one or more revisions to be merged.
  7. Optionally, if you want to configure the options for your merge, press the Next button.
    The Merge Options wizard page is displayed that allows you to configure options for the operation.
    Warning: If the Ignore ancestry / Disable merge tracking option is enabled and you selected all revisions in the Revisions to merge section, revisions that were previously merged will also be included, which may result in conflicts.
  8. Press the Merge button.
    The merge operation is performed.
If the merge is completed successfully, all the changes corresponding to the selected revisions should be merged in your working copy.
It is recommended to look at the results of the merge, in the working copy, to review the changes and see if it meets your expectations. Since merging can sometimes be complicated, you may need to resolve conflicts after making major changes.
Note: The merge result is only in your local working copy and needs to be committed to the repository for it to be available to others.