Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3914 by Error displaying diff (only noticed with diffs generated from .sql files)

*** You must complete this form in its entirety, or your bug report will be
*** rejected.
*** If you have a security issue to report, please send it confidentially
*** Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
*** For customer support, please post to
*** If you have a patch, please submit it to
*** This bug tracker is public. Please check that any logs or other
*** that you include has been stripped of confidential information.

What version are you running?
Reviewboard 2.0.18

What's the URL of the page containing the problem?
(spans across multiple reviews and multiple files)

What steps will reproduce the problem?
1. Edit a .sql file in eclipse and use the eReviewboard plugin to commit a code review or generate a svn diff using command line tools 2. 50% of the time, the resulting review will display the following error when attempting to view the diff: "There was an error displaying this diff ..." 3. If same diff is re-uploaded, sometimes there are no issues with showing the diff.

What is the expected output? What do you see instead?
Expected: A visible diff view

Actual result:
There was an error displaying this diff.
The patch to '[path]/[filename].sql' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.KBberp' for debugging purposes.
`patch` returned:

     This may be a bug in the software, a temporary outage, or an issue
     with the format of your diff.

     Please try again, and if you still have trouble,
     contact support.


    Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 265, in get
    response = renderer.render_to_response(request)
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 56, in render_to_response
    return HttpResponse(self.render_to_string(request))
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 74, in render_to_string
File "/usr/lib/python2.6/site-packages/Djblets-0.8.21-py2.6.egg/djblets/cache/", line 111, in cache_memoize
    data = lookup_callable()
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 73, in <lambda>
    lambda: self.render_to_string_uncached(request),
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 87, in render_to_string_uncached
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 422, in populate_diff_chunks
    chunks = generator.get_chunks()
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 156, in get_chunks
File "/usr/lib/python2.6/site-packages/Djblets-0.8.21-py2.6.egg/djblets/cache/", line 111, in cache_memoize
    data = lookup_callable()
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 155, in <lambda>
    lambda: list(self._get_chunks_uncached()),
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 163, in _get_chunks_uncached
    new = get_patched_file(old, self.filediff, self.request)
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 232, in get_patched_file
    return patch(diff, buffer, filediff.dest_file, request)
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.18-py2.6.egg/reviewboard/diffviewer/", line 168, in patch
    'output': stderr,
Exception: The patch to '[path]/[filename].sql' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.KBberp' for debugging purposes.
`patch` returned:

What operating system are you using? What browser?
Reviewboard is installed on Centos 6.6; users viewing the code review has Windows and are using Internet Explorer, Firefox, or Chrome (same error message for all 3 browser types).

Please provide any additional information below.
This error seems to show up at random; there is no visible difference between the stored diffs for the ones that fail and the ones that succeed. I noticed comments about this sort of issue back in Reviewboard 1.6 (and the solution was that Reviewboard fixed it in a newer version), but we've had this issue since 2.0.15 and I upgraded reviewboard in an attempt to fix it (without any luck). It currently only seems to affect diff files that were generated from .sql files, and if the same diff is loaded up again, it is not always the same files that have issues being displayed.

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to