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

diff3 and adjacent changes at the end of a file

From: Marc Strapetz <marc.strapetz_at_smartsvn.com>
Date: 2005-11-09 16:31:40 CET

When "merging" (diff3) two files with adjacent changes at the end of a file,
SVN produces a conflict which I would not expect. To reproduce this, I have
set up following test case (for which I can also supply corresponding
repository and working copy, if helpful):

For a file ("base") at Rev. x, a newer version ("latest") exists in the
repository. Locally, the file is modified ("local"). The conflict occurs,
when updating file to HEAD. File contents are as follows:

Base: "1\n2\n3\n4\n"
Latest: "One line\n"
Local: "1\n2\n3\n4\n5\n"
Result: "<<<<<<< .mine\n1\n2\n3\n4\n5\n=======\nOne line\n>>>>>>> .rx"

I.e. adding line "5\n" in local is conflicting with replacing lines
"1\n2\n3\n4\n" in latest, although from my understanding this should be an
"adjacent" change? Btw, this situation is similar to trans-5 python test.

When the same change does not occur at the end (=last line) of the file,
diff3 produces no conflict, as expected. File contents here are as follows:

Base: "1\n2\n3\n4\n6\n"
Latest: "One line\n6\n"
Local: "1\n2\n3\n4\n5\n6\n"
Result: "One line\n5\n6\n"

I have tested with version 1.2.3.

If the upper conflict is intended, can someone give me hints on the logic
behind this special case?

Thanks in advance,
 Marc Strapetz.
_______________
smartsvn.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 9 16:32:51 2005

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.