4765: DiffViewer cannot display "newline at end of file" for issues

Misery
4688

What version are you running?

3.0.10

What's the URL of the page containing the problem?

https://rb/r/21645/

What steps will reproduce the problem?

  1. Create a review request
  2. Let the review bot mark an issue
  3. Diffviewer cannot display the code snipped

What is the expected output? What do you see instead?

Show the marked code snipped

What operating system are you using? What browser?

Linux, Firefox

Please provide any additional information below.

There was an error displaying this diff.

Traceback (most recent call last):
File "/opt/reviewboard/dist/lib/python2.7/site-packages/reviewboard/reviews/views.py", line 381, in build_diff_comment_fragments
first_line = max(1, comment.first_line - lines_of_context[0])
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

Looks like it do not like a missing "newline at end of file". As the bot marks it as "File does not end with a newline." and the diffviewer cannot handle this.

Misery
#1 Misery

Oh, duplicate of myself. https://hellosplat.com/s/beanbag/tickets/4688/

Looks like splat-search-index is out of date.

david
#2 david