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
--- 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):