2011-02-21 Ojan Vafai <ojan@chromium.org>
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2011 03:30:09 +0000 (03:30 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2011 03:30:09 +0000 (03:30 +0000)
        Reviewed by Adam Barth.

        [codereviewtool] remove patch fuzzing
        https://bugs.webkit.org/show_bug.cgi?id=54940

        This code is buggy and not as necessary now that we
        include svn revision numbers in uploaded patches.

        * code-review.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79389 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/bugs.webkit.org/ChangeLog
Websites/bugs.webkit.org/code-review.js

index 0746ba2..53832be 100644 (file)
@@ -2,6 +2,18 @@
 
         Reviewed by Adam Barth.
 
+        [codereviewtool] remove patch fuzzing
+        https://bugs.webkit.org/show_bug.cgi?id=54940
+
+        This code is buggy and not as necessary now that we
+        include svn revision numbers in uploaded patches.
+
+        * code-review.js:
+
+2011-02-21  Ojan Vafai  <ojan@chromium.org>
+
+        Reviewed by Adam Barth.
+
         [codereviewtool] focus comment on accept
         https://bugs.webkit.org/show_bug.cgi?id=54930
 
index 00efb36..397a248 100644 (file)
@@ -915,21 +915,13 @@ var CODE_REVIEW_UNITTEST;
   }
 
   function hunkStartingLine(patched_file, context, prev_line, hunk_num) {
-    var PATCH_FUZZ = 2;
     var current_line = -1;
     var last_context_line = context[context.length - 1];
     if (patched_file[prev_line] == last_context_line)
       current_line = prev_line + 1;
     else {
-      for (var i = prev_line - PATCH_FUZZ; i < prev_line + PATCH_FUZZ; i++) {
-        if (patched_file[i] == last_context_line)
-          current_line = i + 1;
-      }
-
-      if (current_line == -1) {
-        console.log('Hunk #' + hunk_num + ' FAILED.');
-        return -1;
-      }
+      console.log('Hunk #' + hunk_num + ' FAILED.');
+      return -1;
     }
 
     // For paranoia sake, confirm the rest of the context matches;