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

Re: merge skipping a revision

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-08-17 22:21:46 CEST

On Aug 17, 2007, at 13:25, Patwardhan, Rajesh wrote:

> Ryan Schmidt wrote:
>
>> On Aug 16, 2007, at 16:12, Gessling, James wrote:
>>
>>> I've been scratching my head over this one and maybe someone can
>>> help
>>> me understand merging from a branch. I've cooked up a synthetic
>>> example that puzzles me.
>>>
>>> I've got a branch "reva" where a new file was added and three
>>> commits
>>
>>> made call it test.c.
>>>
>>> Commited as rev 8 iy looks like this:
>>> line 1
>>> line 2
>>> line 3
>>>
>>> Committed as rev 9 it looks like this:
>>>
>>> line 1
>>> line 2
>>> line 3
>>> line 4
>>> line 5
>>> line 6
>>>
>>> Committed as rev 10 looks like this:
>>>
>>> line 1
>>> line 2
>>> line 3
>>> line 4
>>> line 5
>>> line 6
>>> line 7
>>>
>>> In other words the file started with 3 lines, 3 more then got added
>>> and then the seventh on.
>>>
>>> I wanted to merge rev 8 and 10 to the trunk (skipping 9). I used
>>> the
>>> following commands:
>>> (anonymized)
>>>
>>> svn merge -r 7:8 http://repo.path/svn/module/branches/reva trunk
>>> svn merge -r 9:10 http://repo.path/svn/module/branches/reva trunk
>>>
>>> The first merge is fine, the file is scheduled for additioin on the
>>> trunk, and contains the expected 3 lines The second merge
>>> generates a
>>> conflict that looks like this.
>>>
>>> line 1
>>> line 2
>>> line 3
>>> <<<<<<< .working
>>> =======
>>> line 4
>>> line 5
>>> line 6
>>> line 7
>>>>>>>>>> .merge-right.r10
>>>
>>> Not what I epected. I had figured that since the change from rev
>>> 9 to
>>
>>> 10 was adding "line 7" then I would get only that added with no
>>> conflict. I'm running version 1.2.3, but we also tried it on 1.4.2.
>>> I guess I am not understanding someting, any help would be
>>> appreciated.
>>
>> Revisions are represented as diffs. The diff for r10 doesn't just
>> say "add line 7"; it probably says something more like "add line 7
>> after line 6", and since "line 6" isn't present in the file you're
>> merging into, it's not sure it's done the merge to your complete
>> satisfaction, therefore it declares it a conflict for you to
>> evaluate.
>
> So if I wanted to just promote the changes in revision 10 to the
> branch
> how do I go about doing it?
> Seems to me many may have this requirement, since probably the
> change in
> revision 9 is not related to current fix I am promoting to the branch
> for testing. Am I missing something about the way I should request
> subversion for what I want to do.
> My requirement is very simple I want to promote the changes in
> revision

I think you do it just the way you're doing it. You merge, and if you
encounter a conflict, you resolve the conflict manually.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 17 22:20:52 2007

This is an archived mail posted to the Subversion Users mailing list.