You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ken Miller <kl...@shetlandsoftware.com> on 2004/11/09 22:25:54 UTC

Problems with merge - nothing happens?

I've merged changes across parts of the Subversion tree before, but for 
some reason, I'm having a problem performing a merge.

If I do this:

    svn diff $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 $R/pos/trunk

I see a list of differences.  What I want to do is take the differences 
from the tagged branch, and merge them with the code on the trunk (yes, 
I realize that the 'tag' name is mistake - this was done by a co-worker).

Now, the 'tag' was created at version 3875 (as shown by svn log 
--stop-on-copy ...), so I thought i should be able to do this:

    svn merge $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10@3875 $R/pos/trunk .

where '.' is the most up to date version (3878), ie, it matches 
$R/pos/trunk.  No merges are performed.

What am I doing wrong?  I also tried:

    svn merge -r 3875:head $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 .

(the third form of the merge), and I also got nothing.

Can someone help me out here?

Many thanks.

    -klm.


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

Re: Problems with merge - nothing happens?

Posted by Greg Goodrich <gg...@medinotes.com>.
The one piece of info that seems to be missing is what is your working 
copy pointing to?  I think all are assuming that you have a working copy 
pointing to trunk.  Double check that.  Then the following should work:
    svn merge -rN:M branch .

I am fairly new to subversion, but I don't think the following syntax is 
what you want at all:
   svn merge $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10@3875 $R/pos/trunk .

Ken Miller wrote:

> Walden Mathews wrote:
>
>> | If I do this:
>> | |     svn diff $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 $R/pos/trunk
>> | | I see a list of differences.  What I want to do is take the 
>> differences | from the tagged branch, and merge them with the code on 
>> the trunk
>> There are basically two useful things you can do with merge
>> and these two branches, and a working copy of the trunk:
>>
>> (1) you can apply changes made in the branch to your
>>    trunk.  "svn merge -rN:M branch ."
>>  
>>
> This one is what I want to do.  Change have been made to a piece of 
> in-production code, and my co-worker wants to migrate the changes into 
> the trunk of the development version.
>
>> (2) you can make  your trunk look exactly like the head of
>>    your branch.  "svn merge trunk branch ."
>>  
>>
> I do this regularly when I'm making my fixes to various trees of code, 
> using the
>
>    svn merge -r start:end REPOS-PATH WC
>
> incantation of the merge command.  Works fine for me - this is why I'm 
> confused about why it won't work for this current situation, which to 
> me seems like the same thing.
>
>> Which one are you trying to do?
>>
>> Walden Mathews
>>  
>>
> Cheers!
>
>    -klm.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org


-- 

*Greg Goodrich*
Development Manager

*MediNotes Corporation*
1025 Ashworth Road, Suite 222
West Des Moines, IA 50265
Phone: 515.327.8850 ext. 251/
/Fax: 515.327.8856

	
<http://www.medinotes.com>
*Charting Plus - "The Best EMR Value on the Market!"
**www.medinotes.com* <http://www.medinotes.com/>

 



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

Re: Problems with merge - nothing happens?

Posted by Ken Miller <kl...@shetlandsoftware.com>.
Walden Mathews wrote:

>| If I do this:
>| 
>|     svn diff $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 $R/pos/trunk
>| 
>| I see a list of differences.  What I want to do is take the differences 
>| from the tagged branch, and merge them with the code on the trunk 
>
>There are basically two useful things you can do with merge
>and these two branches, and a working copy of the trunk:
>
>(1) you can apply changes made in the branch to your
>    trunk.  "svn merge -rN:M branch ."
>  
>
This one is what I want to do.  Change have been made to a piece of 
in-production code, and my co-worker wants to migrate the changes into 
the trunk of the development version.

>(2) you can make  your trunk look exactly like the head of
>    your branch.  "svn merge trunk branch ."
>  
>
I do this regularly when I'm making my fixes to various trees of code, 
using the

    svn merge -r start:end REPOS-PATH WC

incantation of the merge command.  Works fine for me - this is why I'm 
confused about why it won't work for this current situation, which to me 
seems like the same thing.

>Which one are you trying to do?
>
>Walden Mathews
>  
>
Cheers!

    -klm.


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

Re: Problems with merge - nothing happens?

Posted by Walden Mathews <wa...@eqwality.com>.
| If I do this:
| 
|     svn diff $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 $R/pos/trunk
| 
| I see a list of differences.  What I want to do is take the differences 
| from the tagged branch, and merge them with the code on the trunk 

There are basically two useful things you can do with merge
and these two branches, and a working copy of the trunk:

(1) you can apply changes made in the branch to your
    trunk.  "svn merge -rN:M branch ."

(2) you can make  your trunk look exactly like the head of
    your branch.  "svn merge trunk branch ."

Which one are you trying to do?

Walden Mathews




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

Re: Problems with merge - nothing happens?

Posted by Jack Repenning <jr...@collab.net>.
On Nov 9, 2004, at 2:25 PM, Ken Miller wrote:

> I've merged changes across parts of the Subversion tree before, but 
> for some reason, I'm having a problem performing a merge.
>
> If I do this:
>
>    svn diff $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 $R/pos/trunk
>
> I see a list of differences.  What I want to do is take the 
> differences from the tagged branch, and merge them with the code on 
> the trunk (yes, I realize that the 'tag' name is mistake - this was 
> done by a co-worker).
>
> Now, the 'tag' was created at version 3875 (as shown by svn log 
> --stop-on-copy ...), so I thought i should be able to do this:
>
>    svn merge $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10@3875 $R/pos/trunk .

I think what's going on is:

As of r3875, the tag pos.AUTH_RETALIX_R1_2_P1 was created, you say.  
That would mean that, as of that rev, it was identical to the point of 
copy-origin (I would assume trunk/).  So the actual content of  
$R/pos/tags/pos.AUTH_RETALIX_R1_2_P10@3875 is identical to the actual 
content of $R/pos/trunk@3875.

Your merge command compares this tree that's the same on either tag or 
trunk as of 3875, with the current state of trunk.  As you noticed with 
diff, differences are found.  They are the changes that have been made 
on *trunk* since r3875.

merge then attempts to apply them to trunk/, and Lo! and Behold! 
they're already there, and so the merge operation does nothing.  (svn 
merge, upon attempting to apply a delta that  matches what's already 
there, doesn't whine or ask about "reversed deltas" like patch would; 
it just silently figgers that's good enough.)

Does that hang together for you?

I think you're actually interested in the changes that have been made 
on tags/pos.AUTH_RETALIX_R1_2_P10/, since r3875.

You might now be thinking that this is your answer:

> svn diff  $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 $R/pos/trunk
> svn merge $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 $R/pos/trunk .

That is, remove the revision info on the first arg.  But it's not.  
Look at the "+" and "-" lines in the diff output: this is a diff on how 
to turn the tag tree into the trunk tree.  When you merge, you apply 
that diff to the trunk tree. But once again, it already looks like 
that, so no changes are made.

OK, now you're thinking "swap the args," and you're getting closer, but 
still not there:

> svn diff  $R/pos/trunk $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10
> svn merge $R/pos/trunk $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 .

This will do something for you, but still not (I think) what you want.  
By reversing the args, you get a diff that will make trunk look exactly 
like the branch.  But you appear to have changes both on tag and trunk; 
you'll lose the trunk changes by this process.  Not, I think, what you 
had in mind.

What I think you're looking for is "find the changes on the 'tag', 
apply them to trunk."  That's the last incantation you specified:

> where '.' is the most up to date version (3878), ie, it matches 
> $R/pos/trunk.  No merges are performed.
>
> What am I doing wrong?  I also tried:
>
>    svn merge -r 3875:head $R/pos/tags/pos.AUTH_RETALIX_R1_2_P10 .

That looks right to me, however you say:

> (the third form of the merge), and I also got nothing.

So now I have to ask you, what's "." like at this point?   What you 
want it to be is a checkout of trunk/.  At that point, applying "the 
changes made on the 'tag' since r3875" to "." means "to trunk" which is 
I think what you want.  Perhaps your "." isn't a trunk/ checkout?  Some 
other subdirectory? "svn info" is a handy way to check.

-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: +1 650.228.2562
c: +1 408.835.8090


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