`svn patch` doesn't detect patch headers without optional whitespace
followed by comments.
See the attached script.
$ ./subversion-svn_patch_misdetects_patch_headers.sh
+ SVN=svn
+ SVNADMIN=svnadmin
+ LC_ALL=C
+ rm -fr repo wc
+ svnadmin create repo
++ pwd
+ svn co file:///home/Arfrever/repo wc
Checked out revision 0.
+ cd wc
+ echo text1
+ svn add file
A file
+ svn ci -m ''
Adding file
Transmitting file data .
Committed revision 1.
+ svn up
At revision 1.
+ echo text2
+ svn di --svnpatch
+ svn revert file
Reverted 'file'
+ cat file.patch1
Index: file
===================================================================
--- file (revision 1)
+++ file (working copy)
@@ -1 +1 @@
-text1
+text2
+ svn patch file.patch1
U file
+ svn st file
M file
+ svn revert file
Reverted 'file'
+ sed -e '3,4s/\(file\).*/\1/' file.patch1
+ cat file.patch2
Index: file
===================================================================
--- file
+++ file
@@ -1 +1 @@
-text1
+text2
+ svn patch file.patch2
+ svn st file
+ patch -p0
patching file file
+ svn st file
M file
$
--
Arfrever Frehtes Taifersar Arahesis
Received on 2009-05-02 02:54:35 CEST