Fix blank diff fragments in interdiffs

Review Request #6838 — Created Jan. 29, 2015 and submitted — Latest diff uploaded

brennie
Review Board
master
reviewboard

Previously, diff fragment comments from interdiffs were sometimes
resulting in a blank diff fragment. This was because of the diff
fragment viewer relying on the 'total_line_count' value in the
filediff/interfilediff line counts. However, this value is not always
guaranteed to have a value. Now we specifically calculate the last
line in the filediff/interfilediff to avoid this issue.

Ran unit tests.

Verified that https://reviews.reviewboard.org/r/6815/#comment19874
does not appear as a blank diff with the patch applied. To do this I
saved and uploaded all the diffs in order and created an issue on the
same lines in the same interdiff.

Loading...