The SVN book states the following:
Once you have performed a reintegrate merge you should not continue to use it for development. The reason for this is that if you try to resynchronize your existing branch from trunk later on, merge tracking will see your reintegration as a trunk change that has not yet been merged into the branch, and will try to merge the branch-to-trunk merge back into the branch! The solution to this is simply to create a new branch from trunk to continue the next phase of your development.
In my case I want to keep using the branch after the reintegration to trunk and continue reintegrating to trunk multiple times. I have done this and I have run into two main problems:
How do I get around this issue if I want to be able to reintegrate from a branch multiple times?
In the svn book it says merge 's --reintegrate is "to merge all of the source URL's changes into the working copy".
A cherry-pick merge is used to merge specific revisions (or revision ranges) from one branch to another. By default, this uses merge tracking to automatically skip any revisions that have already been merged to the target; you can use the --ignore-ancestry option to disable such skipping. SOURCE is usually a URL.
Have a local checkout of the branch to which you want to merge a range of revisions from a source branch. By default, "Merge a range of revisions" is clicked. Click Test Merge to check if it merges desired revisions/files.
You can use the --record-only merge option as explained in SVN book, section Keeping a Reintegrated Branch Alive
Note that from Subversion 1.8, this is no longer needed, as automatic reintegration merge was introduced.
I've seen a number of workarounds on Google but they made me nervous as 'hacks'. To address it I decided to do just what subversion is hinting at in the message. I went back to my branch and explicitly merged the specified revisions:
~/python/orb $ svn merge -r 650:693 https://paulwhippconsulting.slsapp.com/source/orb/trunk
~/python/orb $ svn commit -m 'merged revisions 650:693 from trunk'
Sending occl
Committed revision 695.
Once I did this, I was able to return to the working copy of trunk and reintegrate the branch without any problems.
I hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With