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

New issue 2184 by yuzi...@gmail.com: Mercurial rename support: Pure file renames with *no actual changes* to the file fails with "Diff did not apply cleanly"
http://code.google.com/p/reviewboard/issues/detail?id=2184

* NOTE: Do not post confidential information in this bug report. *
*       If you need immediate support, please contact            *
*       reviewbo...@googlegroups.com                             *

What version are you running?
Reviewboard 1.6 RC2 (also reproducible on RC1)

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


What steps will reproduce the problem?
1. hg mv OLD_FILENAME NEW_FILENAME
2. hg commit -m "Rename a file without changing it"
3. hg export -g `hg parent --template '{node}'` > my_patch.diff
4. Log in to reviewboard
5. Create a review and upload this patch to reviewboard
6. Open your newly created review
7. Click [View Diff]

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

You should see the usual diff view, with:
  Files changed:
    1. NEW_FILENAME (was OLD_FILENAME) [no changes]

Instead, you see:
The patch to 'NEW_FILENAME' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.IzIH1V' for debugging purposes. `patch` returned: patch: **** Only garbage was found in the patch input.

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6rc2-py2.7.egg/reviewboard/diffviewer/views.py", line 151, in view_diff
    interdiffset, highlighting, True)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6rc2-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 1071, in get_diff_files
    large_data=True)
File "/usr/local/lib/python2.7/dist-packages/Djblets-0.6.9-py2.7.egg/djblets/util/misc.py", line 166, in cache_memoize
    data = lookup_callable()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6rc2-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 1070, in <lambda>
    enable_syntax_highlighting)),
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6rc2-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 552, in get_chunks
    new = get_patched_file(old, filediff)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6rc2-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 374, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6rc2-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 242, in patch
    (filename, tempdir, patch_output))
Exception: The patch to 'LICENSE' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.IzIH1V' for debugging purposes.
`patch` returned: patch: **** Only garbage was found in the patch input.

Contents of /tmp/reviewboard.IzIH1V are attached to this bug report.

What operating system are you using? What browser?

Reviewboard is installed on Ubuntu (AWS/EC2)

% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.04
Release:        11.04
Codename:       natty
% uname -a
Linux hostname 2.6.38-8-virtual #42-Ubuntu SMP Mon Apr 11 04:06:34 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Please provide any additional information below.


Attachments:
        NEW_FILENAME.diff  40 bytes
        tmpBNKTGj  14 bytes
        tmpBNKTGj-new  0 bytes

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.

Reply via email to