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

New issue 3414 by matthias...@gmail.com: Diff view error after renaming a file (with git mv)
http://code.google.com/p/reviewboard/issues/detail?id=3414

What version are you running?
ReviewBoard-2.0
RBTools-0.6.1

What's the URL of the page containing the problem?
https://somerbserver/reviewboard/r/{id}/diff/

What steps will reproduce the problem?
1.A git repo is setup within RB, we're doing post-commit reviews
2.Rename a file using git mv: $ git mv somename anothername
3.Run rbt post -p <commit_id>
4.View the review request's diff page

What is the expected output? What do you see instead?
Expected: A diff or message stating that somename was removed and anothername added (or even somename was renamed to anothername). Actually: There was an error displaying this diff. Further down the error message states that `patch` failed.

What operating system are you using? What browser?
RB is running on Ubuntu 12.04. Browser is chrome 35.0.1916.153.

Please provide any additional information below.
The error message states: The patch to 'oldfile' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard._n4Hr7' for debugging purposes. `patch` returned: patch: **** Only garbage was found in the patch input.

That is from a test repository after running `git mv newfile oldfile`, so `oldfile` actually is the new filename.

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/views.py", line 236, in get
    renderer = self.create_renderer(context, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/reviews/views.py", line 1103, in create_renderer
    *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/views.py", line 326, in create_renderer
    self.diff_file = self._get_requested_diff_file()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/views.py", line 368, in _get_requested_diff_file
    request=self.request)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 388, in populate_diff_chunks
    chunks = generator.get_chunks()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 150, in get_chunks
    large_data=True)
File "/usr/local/lib/python2.7/dist-packages/Djblets-0.8-py2.7.egg/djblets/cache/backend.py", line 109, in cache_memoize
    data = lookup_callable()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 149, in <lambda>
    lambda: list(self._get_chunks_uncached()),
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 158, in _get_chunks_uncached
    new = get_patched_file(old, self.filediff, self.request)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 215, in get_patched_file
    return patch(diff, buffer, filediff.dest_file, request)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 145, in patch
    'output': stderr,
Exception: The patch to 'oldfile' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard._n4Hr7' for debugging purposes.
`patch` returned: patch: **** Only garbage was found in the patch input.



Debug output of rbt post:

rbt post --debug --server http://someserver/reviewboard/ --user cli --password <supersecret> --target-groups Reviewteam --submit-as submitter -p bbe44ca326246cc46a8bf0c9500a25cdf1b4f2e2
RBTools 0.6.1
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3]
Running on Linux-3.2.0-61-generic-x86_64-with-Ubuntu-12.04-precise
Home = /srv/git
Current directory = /srv/git/testproject.git
Checking for a Subversion repository...
Running: svn info --non-interactive
Command exited with rc 1: ['svn', 'info', '--non-interactive']
svn: '.' is not a working copy
---
Checking for a Git repository...
Running: git rev-parse --git-dir
Running: git config core.bare
Running: git symbolic-ref -q HEAD
Running: git config --get branch.master.merge
Command exited with rc 1: ['git', 'config', '--get', 'branch.master.merge']
---
Running: git config --get branch.master.remote
Command exited with rc 1: ['git', 'config', '--get', 'branch.master.remote']
---
Running: git config --get remote.origin.url
Command exited with rc 1: ['git', 'config', '--get', 'remote.origin.url']
---
Running: git config --get remote.origin.url
Command exited with rc 1: ['git', 'config', '--get', 'remote.origin.url']
---
repository info: Path: /srv/git/testproject.git, Base path: , Supports changesets: False
Making HTTP GET request to http://someserver/reviewboard/api/
Running: git rev-parse bbe44ca326246cc46a8bf0c9500a25cdf1b4f2e2
Running: git rev-parse bbe44ca326246cc46a8bf0c9500a25cdf1b4f2e2^
Running: git merge-base 4e76d9288a0175c8bdfe8012c8b7624b974995ed master
Running: git diff --no-color --full-index --ignore-submodules --no-renames 4e76d9288a0175c8bdfe8012c8b7624b974995ed..bbe44ca326246cc46a8bf0c9500a25cdf1b4f2e2 -M Running: git diff --no-color --full-index --ignore-submodules --no-renames 30dac728fd744f444db8608e6996cdcb10ea135c..4e76d9288a0175c8bdfe8012c8b7624b974995ed -M Running: git log --reverse --pretty=format:%s%n%n%b ^4e76d9288a0175c8bdfe8012c8b7624b974995ed bbe44ca326246cc46a8bf0c9500a25cdf1b4f2e2 Making HTTP GET request to https://someserver/reviewboard/api/review-requests/ Making HTTP POST request to https://someserver/reviewboard/api/review-requests/ Making HTTP GET request to https://someserver/reviewboard/api/review-requests/99/diffs/ Making HTTP POST request to https://someserver/reviewboard/api/review-requests/99/diffs/ Making HTTP GET request to https://someserver/reviewboard/api/review-requests/99/draft/ Making HTTP PUT request to https://someserver/reviewboard/api/review-requests/99/draft/
Review request #99 posted.

Attachments:
        oldfile.diff  91 bytes
        tmphY08Nq  35 bytes
        tmphY08Nq-new  0 bytes

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
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 reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to