Merging with svn, problems?!
As a developer you often merge branches into the trunk when developing software, where the branch and trunk is fully synched. This scenario usually not give any problems when merging, here you can just use the svn –reintegrate.
But when you are going to merge an unsynched branch into the trunk, different problems will come up. Usually you have to deal with:
- What revision to merge from?
- Conflicts to resolve “manually” (you have tools to assist you, but never trust them entirely. Always check their merge results before commit)
To resolve problem 1, you can use the following command:
svn log --stop-on-copy -r1:HEAD the URL to your branch --limit 1
------------------------------------------------------------------------
r685 | dkt | 2008-08-18 16:02:43 +0200 (Mon, 18 Aug 2008) | 1 line
------------------------------------------------------------------------
Now I know what revision to merge from, so I can merge with the following svn command:
svn merge -r 685:HEAD URL to your branch
Finally, you have to resolve your conflicts manually…
So my point is, either try to keep your branched fully synched with the trunk, then merging is going less painful or use the scenario presented above.
Please comment with your experiences or disagreements to my post.
Possibly Related Posts:
Tags: svn