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

New issue 3573 by Git style mercurial diffs with file renames don't work

What version are you running?
RB 2.0.7

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

What steps will reproduce the problem?
1. 'hg rename file1 file2'
2. 'hg diff -g > rename.patch
3. Create new review request with rename.patch
4. View diff

What is the expected output? What do you see instead?
Expected output is a diff view that only shows the renames (note that the problem also exists with diffs with changes to the renamed files). Actual output in diff summary box shows rename correctly, but diff viewer says revision UNKNOWN with a traceback. See end of bug report for traceback and very simple diffs to recreate the problem.

What operating system are you using? What browser?
Fedora 19, 20, CentOS 6. Firefox 30 & Chrome

Please provide any additional information below.

Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 236, in get
    renderer = self.create_renderer(context, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/reviews/", line 1088, in create_renderer
    *args, **kwargs)
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 328, in create_renderer
    self.diff_file = self._get_requested_diff_file()
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 369, in _get_requested_diff_file
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 383, in populate_diff_chunks
    chunks = generator.get_chunks()
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 153, in get_chunks
File "/usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/", line 111, in cache_memoize
    data = lookup_callable()
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 152, in <lambda>
    lambda: list(self._get_chunks_uncached()),
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 159, in _get_chunks_uncached
    old = get_original_file(self.filediff, self.request, encoding_list)
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/", line 169, in get_original_file
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/", line 291, in get_file
File "/usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/", line 111, in cache_memoize
    data = lookup_callable()
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/", line 290, in <lambda>
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/", line 456, in _get_file_uncached
    data = self.get_scmtool().get_file(path, revision)
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/", line 43, in get_file
    return self.client.cat_file(path, six.text_type(revision))
File "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/", line 264, in cat_file
    raise FileNotFoundError(path, rev)
FileNotFoundError: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository

Diffs to Recreate Issue (I couldn't attach due to "Issue attachment storage quota exceeded")

1) Create repo called "testRepo"
2) Import initialCommit.patch
3) Add to review board
4) Create new review request with rename.patch
5) View diff


exporting patch:
# HG changeset patch
# User Sara Rayburn <
# Date 1411131866 18000
#      Fri Sep 19 08:04:26 2014 -0500
# Node ID f556efc41e9c64befad75cba2d008cb5bf8f52f0
# Parent  0000000000000000000000000000000000000000
Initial commit

diff -r 000000000000 -r f556efc41e9c testFile1.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/testFile1.txt     Fri Sep 19 08:04:26 2014 -0500
@@ -0,0 +1,1 @@
+Some text


diff --git a/testFile1.txt b/testFile2.txt
rename from testFile1.txt
rename to testFile2.txt

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