What is the difference between "svn merge-reintegrate" and svn merge without reintegration if I would like to merge a branch on the trunk

The svn book says: merge --reintegrate means "combine all source URLs into a working copy",

I would like to merge the branch back into the trunk. Some places say that it is "absolutely necessary" to call reintegrate when merging, and then delete the branch immediately after that, I think this is a hassle. Other places do not mention reintegration at all. I have svn 1.6.11.

So I'm not sure what to do now.

+6
source share
2 answers

The merger of synchronization is something completely different than the merger of reintegration. The first is used to merge all changes made to the parent branch into the target branch (usually a function branch) that have not yet been merged. The latter is used to merge the branch (function) back into the parent branch. This basically means that a temporary clone of the branch (function) is created, the synchronization merge is made from the parent branch to the temporary branch, and finally, the parent branch is replaced by the temporary branch. In other words, the temporary branch contains all the changes made to the branch (feature) and the parent branch.

For some reason, some developers do not understand the difference. Thus, SVN developers removed the --reintegrate option in SVN 1.8. In this version, the tool detects automatically if you need to use synchronization merge or merge with reintegration.

If you are using an older version, you should use the --reintegrate option to combine reintegration. Note that the feature branch can still be used after reintegration, if you remember some things. The SVN book explains this well:

+10
source

Switch to svn 1.8 and don’t worry about it anymore, it will automatically figure out what to do.

from svn 1.8 release notes :

During mergers that merge all valid changes from another branch, Subversion 1.8 automatically detects whether the branch reintegrates or not. Therefore, to reintegrate a branch, the -reintegrate option is no longer required for proper operation.

+2
source

Source: https://habr.com/ru/post/951828/


All Articles