[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: I don't understand the merge command at all...

From: Bob Archer <bob.archer_at_amsi.com>
Date: Wed, 2 Sep 2009 15:51:05 -0400

> svn merge seems to defeat my minimal understanding of how Subversion
> works. Case in point. I have a branch, call it branches/A. This
> morning I branched from it:
> svn copy branches/A branches/B
> I made some changes to B, tested them, then checked them in. Then I
> wanted to merge those changes back to branches/A. From my branches/A
> directory I then executed
> svn merge -r 972:973 http://svnhost/.../branches/B .

You should have executed:

svn merge http://svnhost/.../branches/B

> 972 being the highest rev svn info displayed for branches/A and 973
> being the highest rev displayed for branches/B. The merge command was
> completely silent.

You told it to do a diff of rev 972 and 973 on branch/B and merge that into your working copy. I am guessing that there were no changes in branch/B between those revs... which is why it did nothing. That said, this is NOT what you wanted. As you said, you wanted to merge the changes you made in B since you branched it from A... which the command I gave you above will do.

> Doing an svn info on the individual files I see they have revision
> numbers higher than 973. Do I have to wander around and figure out
> the highest rev of all the changed files and use that instead of 973?
> Why do I need revision numbers at all? Can't it just assume the tip
> of the relevant branches?

No, that is what merge tracking does for you. It figures out what the base rev is based on when you created the branch. Then it determines if you have merged anything from the source of the merge into the target already. Once it figures that out then it does a diff and applies it to your WC.



To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-02 21:52:05 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.