Summary : Branching and Merging in Subversion 1.5, compare to 1.0

*edited 23-10-2008* : merging from trunk to branch requires [trunk_url] too : Thanks you, Michael.

I assumed that you have read my (Branching & merging in Subversion 1.0)

This post will emphasis you only the different between 1.0 and 1.5. Both functions were improved in 1.5 is much more easier. If you’re using older version : “It’s worth to switch to 1.5 !!”

  1. Keeping a Branch in sync (No manually tracking any more!!)
    • From trunk to branch : $branch_wc$ svn merge [trunk_url]
    • Subversion automatically track which version has been merged into the branch. You don’t have to specify the revisions range (changeset) anymore !!
    • From feature branch to trunk : $trunk_wc$ svn merge –reintegrate [branch_url]
    • As mentioned in last post, your branch contains some part of the trunk’s code from merging
    • –reintegrate option tell Subversion to carefully replicate only those changes unique to your branch.
    • When the branch is already reintegrated, it can’t continue developing on this code line. You should use “svn delete [branch_url]’. Don’t worry the history of branch is still existed.
    • Again, don’t forget to commit !!
  2. Mergeinfo
    • In your branch working copy, type “svn prpget svn:info”
    • You’ll see output like this “/trunk 341-390”. It specified which revision has been merged and from which development line.
    • try “svn mergeinfo [trunk_url]” This will show you which revision you have merged in to the branch.
    • “svn mergeinfo [trunk_url] –show-revs eligible” will tell you the opposite info, which revision in trunk that hasn’t been merged to branch. (Eligible to merge)
  3. Common usages
    1. Undo change
      • In version 1.0 “svn merge -r 303:302”
      • Now, You can use “svn merge -c -303” too
    2. Resurrecting deleted item

, , , ,

  1. #1 by Michael Greene on October 22, 2008 - 2:32 pm

    I’m pretty sure you still have to specify the trunk_url in the merge -> branch, you just don’t hate to specify a version.

    I have been using and it works for me.

  2. #2 by ijemmy on October 23, 2008 - 6:59 am

    You’re right. >.< I am so careless. Corrected it.
    Thank you, Michael !!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: