Before you start this process, remember to do a commit of your branch picking up any changes that have made. This keeps the log files clean when you commit the trunk merge, and it allows you to completely roll back the changes in case something goes horribly wrong. Assuming you have already committed your branch, proceed as follows:
Check out a copy of trunk if you don't already have one. Otherwise, just cd to the root of it and proceed to step 2.
1. svn co https://server/path/to/project/trunk
cd to the root directory of trunk
2. svn up
this will already be up to date if you just checked it out in step one, but note down the revision number (YYYY) it spits out.
cd to your branch root directory
3. svn log --stop-on-copy
This will display all the revision that have occurred since this branch was cut from the main one. Find the lowest numbered revision (the oldest one), and make a note of it (XXXX).
Now execute the merge with the following:
4. svn merge --dry-run -r XXXX:YYYY https://server/path/to/project/trunk
Note the "--dry-run". That's completely optional of course, but if you think there may be conflicts, it's not a bad idea to get an idea of what they may be before you start.
once you are happy with that, run it for real:
4. svn merge -r XXXX:YYYY https://server/path/to/project/trunk
resolve all the conflicts.
5. svn commit -m "Merged trunk into branch"
No comments:
Post a Comment