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.

Changes between revision 1 and 2

orig
1
2

Commits

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.
a5e8c27bfa8a677b4e7023215e703b01f0e1b8cc David Trowbridge
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...