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

Re: Problems with merge - nothing happens?

From: Jack Repenning <jrepenning_at_collab.net>
Date: 2004-11-11 22:54:33 CET

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
Received on Thu Nov 11 22:54:53 2004

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.