diffviewer: highlight all same-line changes (bug 1224733); r?smacleod draft
authorbyron jones <glob@mozilla.com>
Mon, 21 Nov 2016 15:58:30 +0800
changeset 226 060bc81c3d0e9e5733fbe62e9a4eabfdc140c916
parent 214 50788ce68e0da6378d9843c85f76408ebd7d59ac
push idunknown
push userunknown
push dateunknown
reviewerssmacleod
bugs1224733
diffviewer: highlight all same-line changes (bug 1224733); r?smacleod Always highlight same-line changes, instead of representing the line as unchanged. MozReview-Commit-ID: EY5ZT3vmQjK
reviewboard/reviewboard/diffviewer/diffutils.py
--- a/reviewboard/reviewboard/diffviewer/diffutils.py
+++ b/reviewboard/reviewboard/diffviewer/diffutils.py
@@ -717,18 +717,19 @@ def get_line_changed_regions(oldline, ne
     differ = SequenceMatcher(None, oldline, newline)
 
     # This thresholds our results -- we don't want to show inter-line diffs
     # if most of the line has changed, unless those lines are very short.
 
     # FIXME: just a plain, linear threshold is pretty crummy here.  Short
     # changes in a short line get lost.  I haven't yet thought of a fancy
     # nonlinear test.
-    if differ.ratio() < 0.6:
-        return None, None
+
+    # MozReview: Ignore the last two paragraphs - we always want to show all
+    # changes, so the ratio based logic has been removed.
 
     oldchanges = []
     newchanges = []
     back = (0, 0)
 
     for tag, i1, i2, j1, j2 in differ.get_opcodes():
         if tag == 'equal':
             if (i2 - i1 < 3) or (j2 - j1 < 3):