This merge type is useful when you need to duplicate changes from one child branch (for
example, CB1) to another child branch (CB2) from the same
parent branch. The SVN client will calculate the changes necessary to get from the
HEAD revision of the parent branch (or the trunk) to the
HEAD revision of one of its child branches (CB1), and
apply those changes to your working copy of the other branch (CB2). The
result is that the latter child branch (CB2) will also include the changes
made on the original child branch (CB1), although that branch was not
reintegrated into the parent branch. This merge type could also be used to reintegrate a
child branch back into its parent when the repository does not support merge
tracking.
Note: If the server does not support merge-tracking, then
this is the only way to merge a branch back to its parent.
-
Go to menu .
The Merge wizard is opened.
-
Select the option Merge two different trees.
-
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.
-
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.
-
Press the Next button.
The Merge two different trees wizard page is
displayed.
-
In the From (starting URL and revision) section enter the URL of the first 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 menu, which displays a history of previously used URLs.
Tip: If you are using this method to merge a feature branch back to its
parent branch, you need to start the merge wizard from within a working copy of the
parent. In this field enter the full URL of the parent branch. This may sound wrong,
but remember that the parent is the starting point to which you want to add the branch
changes.
Tip: You can also specify a peg
revision at the end of the URL (for example,
URL@rev1234). By default, the
HEAD revision is assumed.
-
Enter the last revision number at which the two trees were synchronized by choosing
between HEAD revision and other
revision.
- HEAD revision - Use this option if you are sure that no one
else has committed changes since the last synchronization.
- other revision - Use this option to input a specific
revision number and avoid losing recent commits. You can use the
History button to see a list of all revisions.
-
In the To (ending URL and revision) section enter the URL of the second 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 menu, which displays a history of previously used URLs.Tip: If you are using this method to merge a feature branch back to its
parent branch, enter the URL of the feature branch. This way, only the changes unique to
this branch will be merged, since the branch should have been periodically synchronized
with its parent.
Attention: The URL must point to the same repository
as the one in the From (starting URL and revision) field.
Otherwise, the operation will not be allowed, since Subversion cannot compute changes
between items from different repositories.
Tip: You can also specify a peg
revision at the end of the URL (for example,
URL@rev1234).
By default, the
HEAD revision is assumed.
-
Select a revision to compute all changes committed up to that point by choosing between
HEAD revision and other revision.
- HEAD revision - This is the default selected revision.
- other revision - Use this option if you want to enter a
previous revision. You can use the History button to see a list
of all revisions.
-
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.
-
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.