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

Re: how issue-2897 branch solves reflective merges?

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: Fri, 11 Jan 2008 18:43:26 +0530

>> Case3:
>>
>> We merge -r13, -r17(conflicting), -r29 from /trunk to /feature_branch
>> + local non-conflicting change + conflict resolution to r17 to
>> /feature_branch/test.c and commit at r40
>> (Assume this is the only synch up)
>>
>> Now we merge /feature_branch -r1:40 back to /trunk.
>>
>> It does a merge of -r1:39 which is a normal merge.
>> It does a reflective merge of 40.
>> Let us say /feature_branch/test.c got a change from a merge at
>> r40(Our first merge)
>>
>> To calculate the *meaningful diff*, We apply -r13 change to OLDER,
>> and r29 change to OLDER. (SEE WE DONT APPLY r17 as it is a
>> conflicting one)/
>>
>> Now in this case after the above 2 merges(r13, r29) OLDER becomes
>> (YOURS-local non conflicting changes - r17 - conflict resolution to
>> r17) and hence
>> (YOURS-YOURS +local non conflicting changes + r17 + conflict
>> resolution to r17) is applied to MINE. i.e local non conflicting
>> changes + r17 + conflict resolution to r17.
>
> Isn't r17 already contained in MINE and now applied again?
>
> Cheers,
> Folker
>

We are not applying the r17, sorry if I worded it that way. Following
example should make this case clear.

Consider the case
a. /trunk/test.c = 'line1\nline2\nline3'

b. Create feature branch /feature_branch from /trunk

c. Modify /trunk/test.c line1 -> tline1 at r13

d. Modify /trunk/test.c line2 -> tline2 at r17

e. Modify /trunk/test.c line3 -> tline3 at r29

f. Modify /feature_branch/test.c line2 ->fbline2 commit at r30.

g. merge /trunk r13 to /feature_branch working copy. NO COMMIT

h. merge /trunk r17 to /feature_branch working copy. This would give
raise to a conflict resolve it by 'line2' being 'RESOLVED_LINE2'. NO COMMIT

i. merge /trunk r29 to /feature_branch working copy. COMMIT at r40
(Reflective revision)

j. merge /feature_branch to /trunk working copy.

r40 is merged with reflective call back.

reflective_merge_file_changed(mine, older, yours)

mine = 'tline1\ntline2\ntline3'
older = 'line1\nfbline2\nline3'
yours = 'tline1\nRESOLVED_LINE2\ntline3'

After merging r13 older='tline1\nfbline2\nline3'
After merging r29 older='tline1\nfbline2\ntline3'

diff(older, yours) = "@@ -1,3 +1,3 @@
 tline1
-fbline2
+RESOLVED_LINE2
 tline3"

Which would give raise to a conflict as trunk does not have 'fbline2'.

Thanks

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-01-11 14:34:04 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.