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

Re: 'svn merge' vs. diff/patch

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-12-09 21:52:25 CET

Paolo Molaro <lupus@ximian.com> writes:

>> > # check out a branch wc
>> > svn co svn://svn.myrealbox.com/source/branches/mono-1-0/mono/mono/mini
>> >
>> > # examine the patch on trunk (this shows a tiny addition to 'ChangeLog')
>> > svn diff -r37302:37303
>> > svn://svn.myrealbox.com/source/trunk/mono/mono/mini
> [...]
>> > # now apply the same patch to the wc:
>> > svn merge -r37302:37303
>> > svn://svn.myrealbox.com/source/trunk/mono/mono/mini
>> >
>> > ... the merge results in a huge conflict within 'ChangeLog', rather
>> > than just a tiny 3-line addition as 'svn diff' predicted.
>
> The state of the repository has changed, since the patch has been committed
> to the branch (using diff & patch). If you do the initial checkout
> at a revision where the patch was not in the branch you'll get the same
> huge conflict. Try, as the first step:
> svn co -r 37330 svn://svn.myrealbox.com/source/branches/mono-1-0/mono/mono/mini
> and then do the same merge. This gets the wc in mostly the same state as
> when the issue was noticed.

> Note the 60 line conflict instead of the 4 lines one.

Using "--diff3-cmd diff3" to use GNU diff3 intead of Subversion's
built-in diff, or using

$ svn cat -r37330 svn://svn.myrealbox.com/source/branches/mono-1-0/mono/mono/mini/ChangeLog > mine
$ svn cat -r37302 svn://svn.myrealbox.com/source/trunk/mono/mono/mini/ChangeLog > older
$ svn cat -r37303 svn://svn.myrealbox.com/source/trunk/mono/mono/mini/ChangeLog > yours
$ diff3 -Em mine older yours > merged.gnu
$ subversion/tests/libsvn_diff/diff3-test mine older yours > merged.svn

I get a similar conflicts. I'm not sure why diff3 performs so poorly,
but we don't seem to be any worse than the GNU tools.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 10 03:19:36 2004

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.