Correctly request and return FileDiffs with base FileDiff IDs
Review Request #10245 — Created Oct. 19, 2018 and submitted — Latest diff uploaded
The logic to request a diff fragment with a base FileDiff ID was never
actually implemented. TheRB.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 intoget_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.
Diff Revision 2
This is not the most recent revision of the diff. The latest diff is revision 8. See what's changed.
reviewboard/diffviewer/chunk_generator.py |
---|
reviewboard/diffviewer/diffutils.py |
---|
reviewboard/diffviewer/views.py |
---|
reviewboard/diffviewer/tests/test_diffutils.py |
---|
reviewboard/static/rb/js/diffviewer/models/diffReviewableModel.es6.js |
---|
reviewboard/static/rb/js/diffviewer/models/tests/diffReviewableModelTests.js |
---|