Reintegrating a branch (like svn merge --reintegrate) using svnmerge.py

1.3k views Asked by At

Since my SVN repository still uses Subversion 1.4, I am using svnmerge.py for merge tracking. I have a feature branch kept in sync with trunk (svnmerge init after branching, then svnmerge merge every now and then).

Now I want to reintegrate the branch back into the trunk (this is the same situation described in the SVN book).

How can I perform the equivalent of svn merge --reintegrate using svnmerge.py?

1

There are 1 answers

0
AFoglia On BEST ANSWER

You'll need to reinitialize merge tracking on the trunk to discover changes in the branch.

trunk_working_copy$ svnmerge init BRANCH_URL

This should automatically initialize the merge tracking for only the commits after the branch was copied off of trunk. Run svnmerge avail to confirm. If not you'll need to pass the option -r1-<REV> where REV is the revision of the copy.

Then merge from the branch to trunk is just like before (running svnmerge merge).

Finally, you'll want to run svnmerge uninit on the trunk. Otherwise, if other users are following trunk, they'll end up merging in your merge-tracking metadata, and this can make using svnmerge more complicated and inconvenient.