Svn merge branch: Difference between revisions

From Skytech
Jump to navigation Jump to search
(Created page with "Category: Development = SVN merge branch = == Get branch first revision == Goto the branch directory and get the start of the branch revision: <pre> svn log --stop-on-copy...")
 
Line 14: Line 14:
== Merge branch into trunk ==
== Merge branch into trunk ==
Make sure your trunk is trunk is up-to-date, goto trunk dir and do:
Make sure your trunk is trunk is up-to-date, goto trunk dir and do:
</pre>
<pre>
svn up
svn up
</pre>
</pre>

Revision as of 10:07, 16 May 2011


SVN merge branch

Get branch first revision

Goto the branch directory and get the start of the branch revision:

svn log --stop-on-copy

Remember the branching start number, this is your startrev; we'll call it XXXX

Merge branch into trunk

Make sure your trunk is trunk is up-to-date, goto trunk dir and do:

svn up

Keep a note of the " at revision YYYY", you have to use this later.


Then merge branch in by doing (using XXXX from first branch revision and YYYY from the latest svn status):

svn merge -rXXXX:YYYY /svn/site/branch/bubba

Verify everything is ok, fix conflicts etc, then commit

svn ci -m "Merged branch branch_name rXXXX:YYYY"

You've merged your branch into the trunk now.

This small howto does not take into account that your trunk and branch is possible out-of-sync codewise, so you need to keep that up-to-date first!

Tag

Just for personal use, if you need to create a tag from a trunk

svn copy Trunk Tags/1.0.2
svn ci -m "Created tag 1.0.2 from Trunk"