Svn merge branch: Difference between revisions
Jump to navigation
Jump to search
m Reverted edits by 112.237.195.100 (Talk) to last revision by Martin |
|||
Line 1: | Line 1: | ||
[[Category: Development]] | [[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 | |||
</pre> | |||
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: | |||
<pre> | |||
svn up | |||
</pre> | |||
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): | |||
<pre> | |||
svn merge -rXXXX:YYYY /svn/site/branch/bubba | |||
</pre> | |||
Verify everything is ok, fix conflicts etc, then commit | |||
<pre> | |||
svn ci -m "Merged branch branch_name rXXXX:YYYY" | |||
</pre> | |||
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 | |||
<pre> | |||
svn copy Trunk Tags/1.0.2 | |||
svn ci -m "Created tag 1.0.2 from Trunk" | |||
</pre> |
Latest revision as of 15:41, 13 September 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"