You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/07/16 22:15:16 UTC
svn commit: r964935 - /subversion/trunk/subversion/libsvn_client/patch.c
Author: dannas
Date: Fri Jul 16 20:15:16 2010
New Revision: 964935
URL: http://svn.apache.org/viewvc?rev=964935&view=rev
Log:
* subversion/libsvn_client/patch.c
(match_hunk): Require that all lines match when comparing
modified_text to determine if a hunk has already been applied. Else
a hunk that adds a newline at the end will be treated as already
applied even if it isn't.
Modified:
subversion/trunk/subversion/libsvn_client/patch.c
Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=964935&r1=964934&r2=964935&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Fri Jul 16 20:15:16 2010
@@ -702,7 +702,11 @@ match_hunk(svn_boolean_t *matched, patch
SVN_ERR(svn_diff_hunk_readline_original_text(hunk, &hunk_line,
NULL, &hunk_eof,
iterpool, iterpool));
- if (hunk_line->len == 0 && hunk_eof)
+
+ /* When comparing modified text we require that all lines match, else
+ * a hunk that adds a newline at the end will be treated as already
+ * applied even if it isn't. */
+ if (! match_modified && hunk_line->len == 0 && hunk_eof)
*matched = lines_matched;
else
*matched = FALSE;