Correctly request and return FileDiffs with base FileDiff IDs

Review Request #10245 — Created Oct. 19, 2018 and submitted — Latest diff uploaded

brennie
Review Board
release-4.0.x
10233
1cd0436...
reviewboard

The logic to request a diff fragment with a base FileDiff ID was never
actually implemented. The RB.DiffReviewable model generated a URL with
an invalid query string and, even if it were valid, the
DiffFragmentView did not know how to ask for a single FileDiff with a
base FileDiff.

The RB.DiffReviewable model now generates a correct URL and the
DiffFragmentView can parse this into a call into get_diff_files with
the appropriate parameters.

Additionally, the base FileDiff determination in get_diff_files was
incorrect: it returned an ancestor that was too old. This has been
corrected to return the least recent FileDiff from after the specified
base commit.

Ran unit tests.

Loading...