Fix the generation of raw diffs for multi-commit review requests.

Review Request #10456 — Created March 20, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

When grabbing the raw diff of a DiffSet on a multi-commit review
request, the diff would contain the cumulative diff and the diffs of all
files across all commits. This was due to the code attempting to gather
all FileDiffs pointing to the DiffSet, which included those from
commits.

This change updates the logic to be smarter, inspecting what we're
working with and fetching the files based on the capabilities of the
parent object being passed in.

Unit tests passed.

Manually testing that I was only getting the cumulative diff when using
the diffs API or when using the "Download Diff" link.

Commits

Files