Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
To reproduce: apply https://mail-archives.apache.org/mod_mbox/subversion-dev/201604.mbox/raw/%3c20160430005350.GA23087@tarsus.local2%3e/2 to trunk@r1803187
GNU patch 2.7.5-1+b2 (Debian stretch) applies it fine. svn patch (current trunk) reports:
{{
U subversion/svnserve/serve.c
⋮
C subversion/libsvn_repos/repos.c (working copy)
> rejected hunk @@ -882,7 +882,7 @@
}}
The problem is that the hunk headers have a run of spaces instead of a tab.
Two possible improvements here:
1. Change the notification from 'rejected hunk' to 'could not find file'. (It was very confusing to open the unidiff and the target file side by side and to see that the context lines matched 100%.)
2. Add some heuristics to try and find the file the patch is intended for, or prompt the user for the filename, etc.
3. (stsp also mentions that it'd have been nice not to use the 'C' notification here, but that ship has sailed.)