Fix duplicate files showing up in review request emails.

Review Request #13578 — Created Feb. 27, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

For a long time, I've noticed that filenames are duplicated in the
review request emails. Having had my head in the commit code, I finally
realized why: we're iterating over DiffSet.files.all(), which includes
both the files in the commit(s) as well as the files in the cumulative
diff.

This change fixes it so we iterate over the cumulative_files property,
which shows only the FileDiffs in the cumulative diff.

Looked at the review request email previews and no longer saw duplicated
filenames.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix duplicate files showing up in review request emails.
For a long time, I've noticed that filenames are duplicated in the review request emails. Having had my head in the commit code, I finally realized why: we're iterating over `DiffSet.files.all()`, which includes both the files in the commit(s) as well as the files in the cumulative diff. This change fixes it so we iterate over the `cumulative_files` property, which shows only the FileDiffs in the cumulative diff. Testing Done: Looked at the review request email previews and no longer saw duplicated filenames.
775374bebc4f6143923cd6aef2c729559782d735 David Trowbridge
reviewboard/templates/notifications/review_request_email_content.html
reviewboard/templates/notifications/review_request_email_content.txt
Loading...