You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Anil Arora <aa...@interlacesystems.com> on 2004/05/20 18:52:42 UTC

Merge problems

We're using subversion 1.0.3 and we're running into a bunch of issues
with merging now.  

 

Our repository structure is as follows:

 

/

 |- main/

 |- projects/

            |- rowsource/

 

Rowsource is a copy of the main line at revision 234.  

At some point, our main line is at revision 253.  So, I want run the
following command in the working directory for rowsource

 

svn merge -r 234:HEAD svn://subversion.interlacesystems.com/main

 

Before I commit (hours later), there have been numerous changes to the
main line and now it's on revision 270.  

I commit my changes on my project branch.  

Now I want to run a merge again from the main line to the project
branch.  What is the command that I need to run?  

 

svn merge -r 253:HEAD
svn://subversion.interlacesystems.com/projects/rowsource

 

This seems to pick up all of the changes at 253 (which is not correct)

 

svn merge -r 270:HEAD
svn://subversion.interlacesystems.com/projects/rowsource 

 

doesn't pick up anything.  

 

This is way too confusing.  Right now, I'm banging my head against this
trying to figure out how to make this simpler for our developers who
will run into similar use cases.

 

Anil

 

 

 

 

 

 

 

 

                         


Re: Merge problems

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-05-20 at 13:52, Anil Arora wrote:

> Rowsource is a copy of the main line at revision 234.  
> 
> At some point, our main line is at revision 253.  So, I want run the
> following command in the working directory for rowsource
>
> svn merge –r 234:HEAD svn://subversion.interlacesystems.com/main
> 

Great.  So now your working copy of rowsource has all the changes that
happened on 'main' between r234:253.

>  
> 
> Before I commit (hours later), there have been numerous changes to the
> main line and now it’s on revision 270.  
> 
> I commit my changes on my project branch.  
> 
> Now I want to run a merge again from the main line to the project
> branch.  What is the command that I need to run?  
> 
>  
> 
> svn merge –r 253:HEAD
> svn://subversion.interlacesystems.com/projects/rowsource

Wrong.  You want to compare two snapshots of 'main' again, and apply
them to your rowsource working copy.  Exactly like you did the first
time.  But now you want to compare snapshots of 'main' at r253 and r270:

svn merge –r 253:HEAD svn://subversion.interlacesystems.com/main

> 
> This is way too confusing. 

What's confusing?  Here's the simplest possible explanation of 'svn
merge':

The merge command compares two trees, and produces a patch.  It then
applies that patch to your working copy as a local mod.

So, if you're merging "branchA" to "branchB", you always want to compare
two snapshots of branchA, and apply them to a branchB working copy. 
This holds true even when you're doing repeated merges in the same
direction.

You're 90% of the way there.  You just got confused on the repeated
merge attempted, and decided to compare two snapshots of the wrong
branch.



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