Merge Revisions
This case is when you have made one or more changes to a branch and you want to duplicate
them in another branch. For example, suppose you 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, to merge them, you need a working copy of the B2
branch.
To merge revisions from a different branch, follow these steps:
-
Go to menu
.The Merge wizard is opened.
- Select the Merge revisions option.
-
It is recommended that you select 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.
-
Click the Next button.
The Merge revisions wizard page is displayed.
-
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.
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 menu, which displays 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 selected 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, theHEAD
revision is assumed. -
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 form1-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: TheHEAD
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
).- If you click the History button, the History dialog box is displayed, which allows you to select one or more revisions to be merged.
-
Optionally, if you want to configure the options for your merge,
click 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 selected and you chose all revisions in the Revisions to merge section, revisions that were previously merged will also be included, which may result in conflicts.
-
Click 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.