At some stage during the development you will want to merge the changes made on one branch back into the trunk, or vice versa.
Merge is closely related to Diff. The merge is accomplished by comparing two points (branches or revisions) in the repository and applying the obtained differences to your working copy.
It is a good idea to perform a merge into an unmodified working copy. If you have made changes to your working copy, commit them first. If the merge does not go as you expect, you may want to revert the changes and Revert cannot recover your uncommitted modifications.
The Merge command can be found in the Modify submenu of the context menu of the Working Copy view. The directory selected when you issued the command will be the result directory of the merge operation.
By default the start URL will be the URL of the selected file in the working copy. You can browse the repository and select a start URL and then choose a revision.
If you want to merge a range of revisions, leave the Use 'From' URL checkbox checked and simply choose the end revision. Be careful when using the HEAD revision. It may not refer to the revision you think it does if someone else committed changes.
If you want to merge a different branch uncheck the Use 'From' URL checkbox, browse the repository for the desired branch, and choose a revision.
The Ignore ancestry checkbox allows a merge to be applied between a branch and the trunk or between two branches even if they do not share a common ancestry. Normally the branch and the trunk or the two bramches that are merged must have a common ancestor revision in the same repository. But in case the two merged trees were imported in the repository (for example they are two different releases of a vendor that were just downloaded and imported in the same repository) they are not related in the sense of a common ancestor tree. The merge operation is possible in this case only by ignoring the missing common ancestry of the two merged trees.
You can choose to do a Merge operation in order to see what files are affected and how, without modifying the working copy at all. This is very helpful in detecting where conflicts will occur.
of theYou can also perform a
and obtain the diff patch file without doing a merge in the working copy. The diff file is not always easy to read out of context, but for small scale changes it is sometimes useful.The target panel of the dialog reminds you the location of the target resource from the working copy where the merge result will be saved and its corresponding repository URL.
Press the
button in order for the operation to take place. You will obtain the result in the selected resource from the working copy.When the merge is completed it's a good idea to look at the result of the merge and see if it meets your expectations. Because merging is sometimes complicated, when there are major changes, conflicts may appear.