You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Aubuchon <Ke...@reuters.com> on 2006/02/16 22:40:10 UTC

merging

Just to confirm what how we are merging...

 

To merge my branch to trunk: svn merge trunk_url @  rev#  branch_url @
rev#.   No, I didn't type that backwards. The directory to receive the
changes is my trunk working copy directory.

 

Is this how others are merging , or do I misunderstand? 

 

Kevin Aubuchon

Reuters 

717 Office Parkway

St. Louis, MO, 63141

314.468.8174

 



To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd.


Re: merging

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 16, 2006, at 23:40, Kevin Aubuchon wrote:

> To merge my branch to trunk: svn merge trunk_url @  rev#   
> branch_url @ rev#.   No, I didn’t type that backwards. The  
> directory to receive the changes is my trunk working copy directory.
>
> Is this how others are merging , or do I misunderstand?

Not only will that apply the changes made in the branch to the trunk  
working copy, it'll also undo any changes that were made only in the  
trunk. I'm guessing that's not what you want. More usual I think  
would be

svn merge -rA:B branch_url

where A is the revision where the branch was created (or the last  
revision of the branch from which you merged before, if you've merged  
before) and B is the HEAD revision, or the most recent revision of  
the branch you want to merge.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: merging

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 2/16/06, Kevin Aubuchon <Ke...@reuters.com> wrote:
>
> Just to confirm what how we are merging…
>
> To merge my branch to trunk: svn merge trunk_url @  rev#  branch_url @ rev#.
>   No, I didn't type that backwards. The directory to receive the changes is
> my trunk working copy directory.
>
>
>
> Is this how others are merging , or do I misunderstand?

It depends exactly what you're trying to merge.  The command you described:

$ svn merge $REPOS/trunk@REV1 $REPOS/branches/mybranch@REV2 .

Will take the difference between the trunk at REV1 and the branch at
REV2 and apply it to your working copy.  This might be what you want,
but odds are it is not.  For example, if changes were made on the
trunk between the time you branched and now, this would blow them away
as part of the merge.

What you probably want is something like this:

$ svn merge -r REV1:REV2 $REPOS/branches/mybranch .

When executed inside a trunk working copy, this will take the
difference between the branch at REV1 and the branch at REV2 and merge
it into your working copy.  If you're trying to merge all your branch
changes into the trunk, then REV1 is either the revision in which the
branch was created, or the last revision you'd merged from the branch
into the trunk, and REV2 is HEAD.

The general idea is that you're giving merge two trees, and telling it
"merge the difference between these trees into my working copy". 
Usually, those two trees are the same location in the repository, and
they differ only in revision number.

Hope that helps,

-garrett