There are some conditions that apply to reintegrate a branch:
- The server must support merge tracking.
- The source branch (to be reintegrated) must be coherently synchronized with its parent
branch. This means that all revisions between the branching point and the last revision
merged from the parent branch to the child branch must be merged to the latter one (there
must be no missing revisions in-between).
- The working copy must not contain the following:
- Local modifications.
- A mixture of revisions (all items must point to the same revision).
- Sparse directories (all directories must be of depth infinity).
- Switched items.
- The revision of the working copy must be greater than or equal to the last revision of
the parent branch with which the child branch was synchronized.
This method is useful
when you have a feature branch on which the development has concluded and it should be
merged back into its parent branch. Since you have kept the feature branch synchronized with
its parent, the latest versions of them will be absolutely identical except for your feature
branch changes. These changes can be reintegrated into the parent branch by using a working
copy of it and the Reintegrate a branch option.
This method
uses the
merge-tracking features of
Apache Subversion™ to
automatically calculate the correct revision ranges and to perform additional checks that
will ensure that the branch to be reintegrated has been fully updated with its parent
changes. This ensures that you do not accidentally undo work that others have committed to
the parent branch since the last time you synchronized the child branch with it. After the
merge, all branch development will be completely merged back into the parent branch, and the
child branch will be redundant and can be deleted from the repository.
Tip: Before reintegrating the child branch it is recommended to synchronize it with its parent
branch one more time, to help avoid any possible conflicts.
To reintegrate a
child branch into its parent branch, follow these steps:
-
Go to menu .
The Merge wizard is opened.
-
Select the Reintegrate a branch option.
Note: This option is disabled if the selected working copy item (or if it is a directory,
any of the items inside of it) has any type of modification. This is because it is
mandatory for the target item to have no modifications.
-
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 Reintegrate a branch wizard page is
displayed.
-
In the Child branch (URL) text box, enter the URL of the child branch to be reintegrated. This means that the
URL must belong to the same repository as your working copy that was created from the
parent 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: You can also specify a peg
revision at the end of the URL (for example,
URL@rev1234).
The peg revision specifies both the peg revision of the URL and the latest revision that
will be considered for merging. By default, the
HEAD revision is
assumed.
The Merge Options
wizard page is displayed that allows you to configure options for the
operation.Note: Since a reintegrate merge is so specialized, most of the merge options
are not available, except for those in the File Comparison
category.
-
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.