4824: Use a better text diff'ing algorithm (at least as an option)

jsyjr

What version are you running?

Review Board 3.0.6.10 for MathWorks

What's the URL of the page this enhancement relates to, if any?

Describe the enhancement and the motivation for it.

One of my recurring frustrations using reviewboard is its abysmal diff'ing behavior. Since diff'ing under git or emacs behaves so much better I am always shocked when I confront reviewboard's results. In particular it seems to consider a pair of blank lines as sufficient to re-establish a notion of the comparisons being back in sync.

My vote would be for something like "git-diff-files --unified=<n> --diff-algorithm=histogram" for some n significantly greater than the default of 3 (e.g. 7).

What operating system are you using? What browser?

Debian (Jessie?) and Chrome (but does that really matter?)

Please provide any additional information below.

chipx86
#1 chipx86

We do have plans to improve diffing, and have wanted to do this for a while. There are cases where the current algorithm works better, and cases where other algorithms work better, and the plan is to weigh a default based on the file type but to also attempt a couple different algorithms and analyze them to determine the best one. There's a lot of work required to get there. Won't happen for 4.0, but maybe 5.0.