2407: Diff view issue when loading existing file diffs from mercurial

venter*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 8, 2012
This issue only seems to happen with files that is not new to the repository.

New files seem to work fine.

I generated this diff with programs:
mecurial post-review extension
and mecurial diff
i'm having issues with the normal post-review and mecurial but i did log the issue in another ticket

The error log when clicking view diff:

The patch to '{my app}/models.py' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.gugJOg' for debugging purposes. `patch` returned: patching file /tmp/reviewboard.gugJOg/tmp2SOZMr Hunk #1 FAILED at 2. 1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.gugJOg/tmp2SOZMr-new.rej

Traceback (most recent call last):
  File "/home/reviewboard/reviewboard-env/lib/python2.6/site-packages/reviewboard/diffviewer/views.py", line 151, in view_diff
    interdiffset, highlighting, True)
  File "/home/reviewboard/reviewboard-env/lib/python2.6/site-packages/reviewboard/diffviewer/diffutils.py", line 1071, in get_diff_files
    large_data=True)
  File "/home/reviewboard/reviewboard-env/lib/python2.6/site-packages/djblets/util/misc.py", line 156, in cache_memoize
    data = lookup_callable()
  File "/home/reviewboard/reviewboard-env/lib/python2.6/site-packages/reviewboard/diffviewer/diffutils.py", line 1070, in <lambda>
    enable_syntax_highlighting)),
  File "/home/reviewboard/reviewboard-env/lib/python2.6/site-packages/reviewboard/diffviewer/diffutils.py", line 552, in get_chunks
    new = get_patched_file(old, filediff)
  File "/home/reviewboard/reviewboard-env/lib/python2.6/site-packages/reviewboard/diffviewer/diffutils.py", line 374, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
  File "/home/reviewboard/reviewboard-env/lib/python2.6/site-packages/reviewboard/diffviewer/diffutils.py", line 242, in patch
    (filename, tempdir, patch_output))
Exception: The patch to '{my app}/models.py' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.gugJOg' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.gugJOg/tmp2SOZMr
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.gugJOg/tmp2SOZMr-new.re
#1 venter*******@gmai***** (Google Code) (Is this you? Claim this profile.)
This was a issue with a slow connection to bit-bucket that caused this issue, might want to investigate friendly error messages, if connection fail
david
#2 david
Do you know what was being returned from the bitbucket server? Maybe the contents of the file that it was trying to patch?
  • +NeedInfo
david
#3 david
  • -NeedInfo
    +Incomplete