At the office we are responsible for managing our source code in Subversion. Since no one here is all that familiar with Subversion I had to do some research and bug Matthew to find out how to merge back and forth from trunk to branch.
This is a little cheat sheet that I added to our wiki as well.
svn merge
These are command line processes.
Merge a branch back to the trunk
- From the branch, svn log –stop-on-copy, this returns the revision number where the branch began (XXXX)
- From trunk, svn update which will return the last revision number (YYYY)
- From trunk, svn merge -r XXXX:YYYY path/to/branch where XXXX is the branch’s revision and YYYY is the latest revision
- Last but not least svn commit the changes back into trunk with a nice message
Merge from trunk to a branch
- From the branch, svn log –stop-on-copy, this returns the revision number where the branch began (XXXX)
- From trunk, svn update which will return the last revision number (YYYY)
- From the branch, svn merge -r XXXX:YYYY path/to/trunk where XXXX is the branch’s revision and YYYY is the latest revision
- svn commit
For both of these processes I have had more success going directory to directory, example merge the web directory and the src directory separately. Also be sure to svn update both the branch and the trunk to be sure you have the latest source code.




No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URI
Leave a comment