Fix a crash when computing diff headers for filtered-out lines.

Review Request #14001 — Created June 26, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

When attempting to generate diff headers on interdiffs, we can run into
a crash when processing this on a block of filtered-out lines. This is a
symptom of a larger issue with the interdiff filtering logic, which will
be dealt with separately, but can be easily worked around by checking
what we're comparing against before making assumptions about the data.

Unit tests passed.

Verified that this fixed the crash occurring in an interdiff.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix a crash when computing diff headers for filtered-out lines.
When attempting to generate diff headers on interdiffs, we can run into a crash when processing this on a block of filtered-out lines. This is a symptom of a larger issue with the interdiff filtering logic, which will be dealt with separately, but can be easily worked around by checking what we're comparing against before making assumptions about the data.
40f5f349f17722206ad3c709ed8b98da3499d0a1 Christian Hammond
reviewboard/diffviewer/templatetags/difftags.py
Loading...