Closed Bug 1286309 Opened 8 years ago Closed 6 years ago

Support patience diff in diff viewer

Categories

(MozReview Graveyard :: Review Board: User Interface, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: jrmuizel, Unassigned)

Details

Attachments

(2 files)

Patience diff tends to do a better job of figuring out what actually changed compared to the more traditional diff.
Attached patch regular-diffSplinter Review
Attached patch patience-diffSplinter Review
(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 https://github.com/reviewboard/reviewboard/blob/280069e31a306fae11aba1a616d52904c49c5299/reviewboard/diffviewer/myersdiff.py - also note that some of the extra features in RB's diff viewer may come from code after the diff algorithm is run.
MozReview is now obsolete. Please use Phabricator instead. Closing this bug.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: