You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Summers <da...@summersoft.fay.ar.us> on 2005/07/29 20:35:39 UTC

More strange merge conflicts.

Hello Subversionistas,

   I've copied trunk to a branch, worked on the branch off and on for 
several months.  Periodically, I'll merge the changes from the trunk to 
the branch to keep it up-2-date.  It worked fine for several times in a 
row over the course of a month or so.

The last two times I've tried to merge the trunk to the branch, I've 
gotten several conflicts.

I don't understand those conflicts because nothing has changed on the 
branch in those directories.  They have to do with directories that I'm 
not even working with on the branch.

It happened the first time a couple of months ago when I hadn't done 
anything on the branch for a few weeks.

While on the branch I did a "svn merge -rLAST_WEEKLY_MERGE+1:HEAD 
URL_OF_TRUNK".

I keep track of the merge revisions in the log message.

I got several conflicts.  Last time the non-trivial conflict I got I just 
copied from trunk and committed to resolve it.

I did it again today because now we are finally getting ready to merge in 
the feature branch back into trunk and I got several more conflicts again.
Again most of them were trivial (white-space?) conflicts (but again I 
don't understand why the conflict because nothing changed on the branch in 
those directories).

However, the last conflict, it appears that changes made on the trunk are 
not being brought over to the branch.

The trunk compiles cleanly, the branch compiles cleanly before the merge.
However, after the merge, it shows conflicts.  It also does NOT compile 
cleanly (even after trying to resolve the conflicts) and it appears that 
the conflicts are where stuff is missing in the resulting merged file from 
changes that were made in trunk that now should be there in the branch 
from the merge from trunk.

(I hope I said all that correctly).

Any ideas as to what I'm doing wrong?

The merge was done with subversion 1.1.4 the first time and 
subversion 1.2.1 today.

Am I mis-understanding some concept of branching/merging?

Thanks!

--
David Wayne Summers        "Linux: Because reboots are for hardware upgrades!"
david@summersoft.fay.ar.us PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  0B44 B118 85CC F4EC 7021  1ED4 1516 5B78 E320 2001

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

Re: More strange merge conflicts.

Posted by Steve Greenland <st...@lsli.com>.
On Mon, Aug 01, 2005 at 12:43:56PM -0400, Martin J. Stumpf wrote:
> 
> If what Scott says is true, which I believe it is, then why would Ben 
> suggest the use of 100 to remove the errors? ie. overlapping the 
> previous last rev with the current first rev. I have always skipped the 
> commit rev on the branch just like David suggests. It seems so logical 
> somehow. I am confused a bit now.

He's not overlapping. Rev r100 is the merge commit rev, the OP was
starting the new merge with r101. But r101 had to come from *somewhere*,
and the OP is dropping that change.

Steve

-- 
"Outlook not so good." That magic 8-ball knows everything! I'll ask
about Exchange Server next.
                           -- (Stolen from the net)

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

Re: More strange merge conflicts.

Posted by Scott Palmer <sc...@2connected.org>.
On 1-Aug-05, at 12:43 PM, Martin J. Stumpf wrote:

> Scott Palmer wrote:
>> On 30-Jul-05, at 11:31 AM, David Summers wrote:
>>> On Sat, 30 Jul 2005, Ben Collins-Sussman wrote:
>>>> On Jul 29, 2005, at 3:35 PM, David Summers wrote:
>>> I.E., I originally did svn merge -r 1:99 URL_OF_TRUNK and  
>>> committed  that as r100 on the branch, then later I did svn merge  
>>> -r 101:199  URL_OF_TRUNK.
>>
>> The merge command merges the changes that were made *starting  
>> with*  one revision to get to another revision.
>> In you example above, what changes were made to get from r100 to   
>> r101?  In your case it would be ok to skip the commit to trunk,  
>> but  you are also skipping that the next commit after it.  It  
>> probably  isn't worth the effort to try to skip commits that  
>> happen on an  unrelated branch, since they won't be included in  
>> the branch you are  merging anyway.
>
> If what Scott says is true, which I believe it is, then why would  
> Ben suggest the use of 100 to remove the errors? ie. overlapping  
> the previous last rev with the current first rev. I have always  
> skipped the commit rev on the branch just like David suggests. It  
> seems so logical somehow. I am confused a bit now.

In this particular case he could start the second merge at r99 or  
r100.  The point is you have to start with the rev prior to r101 in  
order to pick up the change that *made* r101.   Ben suggests not  
going back as far as r99 because 99 to 100 was the commit on the  
branch,which doesn't matter in this case.  You could include r99 as  
the starting point for the second merge, since the change was not on  
the trunk it wouldn't have any effect.

The first number (A) in the merge rA:B is the revision that you are  
at, the second (B) is the revision you want to get to. in terms of  
changes to merge.

Scott

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

Re: More strange merge conflicts.

Posted by "Martin J. Stumpf" <mj...@jhu.edu>.
Scott Palmer wrote:

>
> On 30-Jul-05, at 11:31 AM, David Summers wrote:
>
>> On Sat, 30 Jul 2005, Ben Collins-Sussman wrote:
>>
>>> On Jul 29, 2005, at 3:35 PM, David Summers wrote:
>>>
>>>> While on the branch I did a "svn merge -rLAST_WEEKLY_MERGE+1:HEAD  
>>>> URL_OF_TRUNK".
>>>
>>>
>>> This is your mistake.  If you first run
>>>
>>>   svn merge -r 50:100 trunkURL
>>>
>>> ...and then two weeks later, run
>>>
>>>   svn merge -r 101:200 trunkURL
>>>
>>> ...then the change made in r101 is never merged!  You've skipped a  
>>> revision. And this is why you're getting conflicts further down  the 
>>> road.   Your second merge command should have been -r 100:200.
>>
>>
>> OK, Thanks, I'll have to expiriment with that I guess.
>>
>> The reason I did the LAST_WEEKLY+1 was because the LAST_WEEKLY was  
>> the number of the last weekly commit itself (hopefully that makes  
>> sense).
>> I.E., I originally did svn merge -r 1:99 URL_OF_TRUNK and committed  
>> that as r100 on the branch, then later I did svn merge -r 101:199  
>> URL_OF_TRUNK.
>
>
> The merge command merges the changes that were made *starting with*  
> one revision to get to another revision.
> In you example above, what changes were made to get from r100 to  
> r101?  In your case it would be ok to skip the commit to trunk, but  
> you are also skipping that the next commit after it.  It probably  
> isn't worth the effort to try to skip commits that happen on an  
> unrelated branch, since they won't be included in the branch you are  
> merging anyway.

If what Scott says is true, which I believe it is, then why would Ben 
suggest the use of 100 to remove the errors? ie. overlapping the 
previous last rev with the current first rev. I have always skipped the 
commit rev on the branch just like David suggests. It seems so logical 
somehow. I am confused a bit now.

-Martin

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

Re: More strange merge conflicts.

Posted by Scott Palmer <sc...@2connected.org>.
On 30-Jul-05, at 11:31 AM, David Summers wrote:

> On Sat, 30 Jul 2005, Ben Collins-Sussman wrote:
>> On Jul 29, 2005, at 3:35 PM, David Summers wrote:
>>> While on the branch I did a "svn merge -rLAST_WEEKLY_MERGE+1:HEAD  
>>> URL_OF_TRUNK".
>>
>> This is your mistake.  If you first run
>>
>>   svn merge -r 50:100 trunkURL
>>
>> ...and then two weeks later, run
>>
>>   svn merge -r 101:200 trunkURL
>>
>> ...then the change made in r101 is never merged!  You've skipped a  
>> revision. And this is why you're getting conflicts further down  
>> the road.   Your second merge command should have been -r 100:200.
>
> OK, Thanks, I'll have to expiriment with that I guess.
>
> The reason I did the LAST_WEEKLY+1 was because the LAST_WEEKLY was  
> the number of the last weekly commit itself (hopefully that makes  
> sense).
> I.E., I originally did svn merge -r 1:99 URL_OF_TRUNK and committed  
> that as r100 on the branch, then later I did svn merge -r 101:199  
> URL_OF_TRUNK.

The merge command merges the changes that were made *starting with*  
one revision to get to another revision.
In you example above, what changes were made to get from r100 to  
r101?  In your case it would be ok to skip the commit to trunk, but  
you are also skipping that the next commit after it.  It probably  
isn't worth the effort to try to skip commits that happen on an  
unrelated branch, since they won't be included in the branch you are  
merging anyway.


Scott

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

Re: More strange merge conflicts.

Posted by David Summers <da...@summersoft.fay.ar.us>.
On Sat, 30 Jul 2005, Ben Collins-Sussman wrote:

> On Jul 29, 2005, at 3:35 PM, David Summers wrote:
>
>> 
>> While on the branch I did a "svn merge -rLAST_WEEKLY_MERGE+1:HEAD 
>> URL_OF_TRUNK".
>
>
> This is your mistake.  If you first run
>
>   svn merge -r 50:100 trunkURL
>
> ...and then two weeks later, run
>
>   svn merge -r 101:200 trunkURL
>
> ...then the change made in r101 is never merged!  You've skipped a revision. 
> And this is why you're getting conflicts further down the road.   Your second 
> merge command should have been -r 100:200.
>
>

OK, Thanks, I'll have to expiriment with that I guess.

The reason I did the LAST_WEEKLY+1 was because the LAST_WEEKLY was the 
number of the last weekly commit itself (hopefully that makes sense).
I.E., I originally did svn merge -r 1:99 URL_OF_TRUNK and committed that 
as r100 on the branch, then later I did svn merge -r 101:199 URL_OF_TRUNK.

Therefore it seems that it wouldn't make a difference because that commit 
was not to trunk but to the branch, so I'm not sure how that could affect 
a subsequent merge from the trunk to the branch.

But, I'll try that next time and see if that resolves the wierd conflicts 
I've been getting.

--
David Wayne Summers        "Linux: Because reboots are for hardware upgrades!"
david@summersoft.fay.ar.us PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  0B44 B118 85CC F4EC 7021  1ED4 1516 5B78 E320 2001

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

Re: More strange merge conflicts.

Posted by Erik Wasser <er...@iquer.net>.
On Saturday 30 July 2005 17:21, Ben Collins-Sussman wrote:

> This is your mistake.  If you first run
>
>     svn merge -r 50:100 trunkURL
>
> ...and then two weeks later, run
>
>     svn merge -r 101:200 trunkURL

Ups. I understood the concept or revisions that I merge the changes made 
in revision A,A+1,...,B-1,B to the other branch.

But I seems that svn merges the changes between(!) A - A+1 and A+1 - 
A+2, ..., B-1 - B to the other branch. Is that correct?

I've read the manual but I haven't found a clear statement about this 
behavior so I'm a little confused now. B-)

-- 
So long... Fuzz

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

Re: More strange merge conflicts.

Posted by Ben Collins-Sussman <su...@collab.net>.
On Jul 29, 2005, at 3:35 PM, David Summers wrote:

>
> While on the branch I did a "svn merge -rLAST_WEEKLY_MERGE+1:HEAD  
> URL_OF_TRUNK".


This is your mistake.  If you first run

    svn merge -r 50:100 trunkURL

...and then two weeks later, run

    svn merge -r 101:200 trunkURL

...then the change made in r101 is never merged!  You've skipped a  
revision.  And this is why you're getting conflicts further down the  
road.   Your second merge command should have been -r 100:200.


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