I have got one specific file like this:
+
+ %3)+Lorem
+
+ %4)+Lorem
+
+ %5)+Lorem
+
+
I generate unified diff using python 2.7 difflib with all context lines:
--- bug-3.txt 2012-07-23 15:25:42
+++ FILE 2012-07-23 15:25:42
@@ -1,8 +1,10 @@
+
+ %3)+Lorem
+
+ %4)+Lorem
+
+ %5)+Lorem
+
++ %6)+Lorem
++
+
And when I call patch (patch --verbose bug-3.txt bug-3.patch) it gives me this error:
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- bug-3.txt 2012-07-23 15:25:42
|+++ FILE 2012-07-23 15:25:42
--------------------------
Patching file bug-3.txt using Plan A...
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file bug-3.txt.rej
done
I thing there could be bug in patch. Do you have any idea what exactly cause this error and what to do with it?
I run Ubuntu 12.04 and patch patch 2.6.1.