Julian Foad created SVN-4610:
--------------------------------
Summary: svn patch - improve detection of reversed or
already-applied patches
Key: SVN-4610
URL: https://issues.apache.org/jira/browse/SVN-4610
Project: Subversion
Issue Type: Bug
Affects Versions: 1.9.3, 1.8.15
Reporter: Julian Foad
Priority: Minor
svn patch sometimes fails to detect when a patch has already been applied,
whereas GNU patch does detect that and warn.
This example involves a patch that is applied with fuzz and offset. This was
observed and reported by one of WANdisco's customers, with a real patch to some
*BSD source code; I have reduced one of their test cases to a small abstract
example here.
Example:
{code:title=file1}
A
B
C
D
E
F
G
{code}
{code:title=patch1}
Index: file1
===================================================================
--- file1 (revision 1)
+++ file1 (working copy)
@@ -7,6 +7,8 @@
C
D
+E
+
F
G
{code}
{code:title=test.log}
$ svn --version -q
1.9.3
$ svn patch patch1
U file1
> applied hunk @@ -7,6 +7,8 @@ with offset -2 and fuzz 2
$ svn revert -q file1
$ patch --version | head -1
GNU patch 2.7.1
$ patch < patch1
patching file file1
Reversed (or previously applied) patch detected! Assume -R? [n]
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)