You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by jc...@apache.org on 2013/01/16 00:41:49 UTC

svn commit: r1433740 - in /subversion/branches/1.7.x-issue4270: ./ subversion/libsvn_diff/diff_file.c

Author: jcorvel
Date: Tue Jan 15 23:41:49 2013
New Revision: 1433740

URL: http://svn.apache.org/viewvc?rev=1433740&view=rev
Log:
On the '1.7.x-issue4270' branch: merge r1427197 from trunk.

Resolved a trivial conflict on deleting a line which had changed on trunk.

Modified:
    subversion/branches/1.7.x-issue4270/   (props changed)
    subversion/branches/1.7.x-issue4270/subversion/libsvn_diff/diff_file.c

Propchange: subversion/branches/1.7.x-issue4270/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1427197

Modified: subversion/branches/1.7.x-issue4270/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4270/subversion/libsvn_diff/diff_file.c?rev=1433740&r1=1433739&r2=1433740&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4270/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/1.7.x-issue4270/subversion/libsvn_diff/diff_file.c Tue Jan 15 23:41:49 2013
@@ -430,7 +430,7 @@ find_identical_prefix(svn_boolean_t *rea
         }
 
       is_match = TRUE;
-      for (delta = 0; delta < max_delta && is_match; delta += sizeof(apr_uintptr_t))
+      for (delta = 0; delta < max_delta; delta += sizeof(apr_uintptr_t))
         {
           apr_uintptr_t chunk = *(const apr_size_t *)(file[0].curp + delta);
           if (contains_eol(chunk))
@@ -440,18 +440,25 @@ find_identical_prefix(svn_boolean_t *rea
             if (chunk != *(const apr_size_t *)(file[i].curp + delta))
               {
                 is_match = FALSE;
-                delta -= sizeof(apr_size_t);
                 break;
               }
+
+          if (! is_match)
+            break;
         }
 
-      /* We either found a mismatch or an EOL at or shortly behind curp+delta
-       * or we cannot proceed with chunky ops without exceeding endp.
-       * In any way, everything up to curp + delta is equal and not an EOL.
-       */
-      for (i = 0; i < file_len; i++)
-        file[i].curp += delta;
+      if (delta /* > 0*/)
+        {
+          /* We either found a mismatch or an EOL at or shortly behind curp+delta
+           * or we cannot proceed with chunky ops without exceeding endp.
+           * In any way, everything up to curp + delta is equal and not an EOL.
+           */
+          for (i = 0; i < file_len; i++)
+            file[i].curp += delta;
 
+          /* Skipped data without EOL markers, so last char was not a CR. */
+          had_cr = FALSE; 
+        }
 #endif
 
       *reached_one_eof = is_one_at_eof(file, file_len);