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

Re: svn diff produces a patch which does not reapply cleanly

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 7 Jan 2009 22:23:43 +0100

On Wed, Jan 7, 2009 at 22:18, Stefan Küng <tortoisesvn_at_gmail.com> wrote:
> On Wed, Jan 7, 2009 at 21:41, Stefan Küng <tortoisesvn_at_gmail.com> wrote:
>> If there was a documentation on how a patch has to be created and how
>> those chunk infos are supposed to work, it would be easier...
>
> Found this:
> http://en.wikipedia.org/wiki/Diff
>
> but the chunk info is not very clearly documented there either. I'll
> do some more checks...

Got a copy of the gnu diff for Windows, and the output of

diff --unified=1 test.txt test_v2.txt > out

looks different than what Subversion produces. The second chunk starts with
@@ -4,9 +7,9 @@
instead of
@@ -2,9 +5,9 @@

which is also what TortoiseMerge expects.

The full output of gnu diff for those two files:

--- ..\test.txt 2009-01-07 21:54:33.135280400 +0100
+++ ..\test_v2.txt 2009-01-06 21:33:35.120879900 +0100
@@ -1 +1,4 @@
+line_1a
+line_1b
+line_1c
 line_1
@@ -4,9 +7,9 @@
 line_4
-line_5
-line_6
-line_7
+line_5a
+line_6a
+line_7a
 line_8
-line_9
-line_10
-line_11
+line_9a
+line_10a
+line_11a
 line_12
\ No newline at end of file

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
Received on 2009-01-07 22:23:59 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.