Reintegrate a Branch

There are some conditions that apply to reintegrate a branch:
Tip: You can use the pre-merge checks option to make sure these conditions are fulfilled.

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:
  1. Go to menu Tools > Merge.
    The Merge wizard is opened.
  2. 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.
  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 Reintegrate a branch wizard page is displayed.
  5. 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 list, which shows 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.

  6. The Merge Options wizard page is displayed that allows you to configure options for the operation.
    Note: Because a reintegrate merge is so specialized, most of the merge options are not available, except for those in the File Comparison category.
  7. 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.