Select correct original file attachment when viewing commit ranges.

Review Request #13675 — Created March 28, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

When viewing a range of commits, we weren't properly choosing the
original file attachment. This change makes it so if there's a
base_filediff present in the diff file information, we load the
attachment that is connected to that filediff.

Posted a change that involved several commits to the same image file.
Selected various commit ranges and got the correct diffs for each commit
range.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Select correct original file attachment when viewing commit ranges.
When viewing a range of commits, we weren't properly choosing the original file attachment. This change makes it so if there's a `base_filediff` present in the diff file information, we load the attachment that is connected to that filediff. Testing Done: Posted a change that involved several commits to the same image file. Selected various commit ranges and got the correct diffs for each commit range.
9de776fce8b520112bcbd67081a8f988fd1f4ec1 David Trowbridge
reviewboard/reviews/views/diff_fragments.py
Loading...