Support patience diff in diff viewer



2 years ago
2 years ago


(Reporter: jrmuizel, Unassigned)




(2 attachments)



2 years ago
Patience diff tends to do a better job of figuring out what actually changed compared to the more traditional diff.

Comment 1

2 years ago
Created attachment 8770210 [details] [diff] [review]
Comment hidden (typo)

Comment 3

2 years ago
Created attachment 8770212 [details] [diff] [review]
Comment hidden (obsolete)
(In reply to Mike Conley (:mconley) - (Needinfo me!) from comment #4)
> I'm pretty sure if Review Board sees a valid diff (and a Patience Diff is
> valid), it shouldn't, like, restructure the diff or regenerate it or
> anything. What I'm trying to say, is that I'm pretty certain that Review
> Board can display Patience Diffs.

This is incorrect. The algorithm used by Review Board is the following:
 - Take the provided diff, parse it into sections by file.
 - Fetch the files listed in the diff from the repository (at the parent revision).
 - Apply the provided diff to these files, so Review Board has pre and post patch versions.
 - Run RBs built-in diffing algorithm[1] to generate its side-by-side diff.

So no matter what diff you feed into RB, if it results in the same original vs patched files you will get the same output in the Review Board diff viewer.

[1] The diff algorithm used by Review Board is a modified version of the Myers' diff (with some extra features I believe). For the code Review Board uses see - also note that some of the extra features in RB's diff viewer may come from code after the diff algorithm is run.
Aw hell.
You need to log in before you can comment on or make changes to this bug.