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

New issue 1853 by eddawley: Diff fails to apply cleanly if a line is removed that begins with "--" (2 dashes)

*NOTE: Do not post confidential information in this bug report.*

What version are you running?

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

What steps will reproduce the problem?
1.  Commit a file containing the following to svn

-- blah

2.  Remove the line from the file
3.  Post a review of the file
4.  View the diff in the UI

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

Expected to see a valid diff with the line that was removed highlighted.
Actual is the following exception:

Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/reviewboard/diffviewer/", line 153, in view_diff
    interdiffset, highlighting, True)
File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/reviewboard/diffviewer/", line 1063, in get_diff_files
File "/usr/lib/python2.4/site-packages/Djblets-0.6.4-py2.4.egg/djblets/util/", line 166, in cache_memoize
    data = lookup_callable()
File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/reviewboard/diffviewer/", line 1062, in <lambda>
File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/reviewboard/diffviewer/", line 549, in get_chunks
    new = get_patched_file(old, filediff)
File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/reviewboard/diffviewer/", line 374, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
File "/usr/lib/python2.4/site-packages/ReviewBoard-1.5-py2.4.egg/reviewboard/diffviewer/", line 239, in patch raise Exception(_("The patch to '%s' didn't apply cleanly. The temporary " + Exception: The patch to 'a_file.sql' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.dI2b6J' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.dI2b6J/tmpUpf2CS
patch: **** malformed patch at line 2:

What operating system are you using? What browser?
centos 5, chrome

Please provide any additional information below.

MySQL supports specifying comments with "--" (2 dashes) so this has only legitimately come up for me in SQL files.

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

Reply via email to