Hallo experts,
A simple question from me, an old newbie to Tortoise SVN.
I'm working on a branch, and want now to merge the changes in my branch (after commit) to the trunk. However I'm not sure about the correct workflow. Should I first merge the trunk to my working copy, after resolving all the possible conflicts, then reintegrate my branch to the trunk? Since most of my colleague are开发者_如何学运维 still in holidays, I cannot get any advices on such basics in my team.
Thanks a lot in advance,
John in Munich
Yes.
Not sure what else to add given that you said it all :)
It's worth noting that the reintegrate feature basically makes your branch useless for further development so it must be the last step ever, right before branch deletion, so try to avoid until you're fully sure that the code is production ready. If unsure, you can do a regular merge from branch to trunk. Why the feature even exists is something that I've never been able to grasp; I suppose it's a side effect of Subversion's poor merge tracking.
I also suggest you don't perform all merges at once and, instead, try to divide them into smaller sets and commit your work between merges. If you get a merge conflict you can't easily fix you want to be able to revert.
Update: The official Version Control with Subversion books says this:
In Subversion 1.5, once a --reintegrate merge is done from branch to trunk, the branch is no longer usable for further work. It's not able to correctly absorb new trunk changes, nor can it be properly reintegrated to trunk again. For this reason, if you want to keep working on your feature branch, we recommend destroying it and then re-creating it from the trunk
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchemerge.basicmerging.reintegrate
First commit the changes that you made in your branch in to svn.
Then use merge feature (with specific revision number) of svn to merge from your branch to other branch (or main/trunk). Once you have the merged changes (all conflicts resolved) in your local copy of 'the other branch (main/trunk)', commit those changes back to svn and you are done.
Yes, this is the way to go.
As you probably have a feature branch, what you have to do is described in the SVN redbook.
To paraphrase:
- Merge
trunk
into your branch - Merge your branch into
trunk
using thereintegrate
parameter
精彩评论