I have an SVN (1.6.12) project containing a trunk and one branch. I am trying to learn how merging works.
project
+ trunk (14)
+ branches
+ test-branch (14)
The numbers in parentheses are the revision numbers. I execute a merge from the trunk to the test branch using the the commands "cd branches/test-branch; svn merge svn+ssh://.../trunk
"
and commit the changes with "svn commit -m 'Merged trunk'
". My directory structure now looks like this:
project
+ trunk (14)
+ branches
+ test-branch (15)
I then try to do a reintegrate merge between the trunk and test-branch: "cd trunk; svn merge --reintegrate svn+ssh://.../branches/test-branch
". SVN complains that the trunk needs to be at revision 15. I do a "svn update
" and the directory structure looks like this:
project
+ trunk (15)
+ branches
+ test-branch (15)
Cool! Ready to reintegrate. I try the "svn merge --reintegrate svn+ssh://.../branches/test-branch
" again. Now SVN complains that I need to merge all of the trunk changes into the branch before reintegrating. The trunk is at 15 and but the test-branch has only merged through 14.
How do I resolve this? If I merge into the branch and then commit, the branch will be at 16. I tried using "svn switch
" on the trunk, but I get the same errors.
The reason the repository is at 14 is because I keep see-sawing between the trunk and test-branch merges. One definition of insanity is repeating the same process and expecting a different outcome :-).
Thanks.