2134: Diff breaks the review board.

code*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 30, 2012
What version are you running?

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

What steps will reproduce the problem?
1.  Go to https://svn.reviewboard.kde.org/r/6689/diff/3/

What is the expected output? What do you see instead?
I expect to see the diff.

I get:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5.5-py2.6.egg/reviewboard/diffviewer/views.py", line 153, in view_diff
    interdiffset, highlighting, True)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5.5-py2.6.egg/reviewboard/diffviewer/diffutils.py", line 1066, in get_diff_files
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.7-py2.6.egg/djblets/util/misc.py", line 166, in cache_memoize
    data = lookup_callable()
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5.5-py2.6.egg/reviewboard/diffviewer/diffutils.py", line 1065, in <lambda>
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5.5-py2.6.egg/reviewboard/diffviewer/diffutils.py", line 552, in get_chunks
    new = get_patched_file(old, filediff)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5.5-py2.6.egg/reviewboard/diffviewer/diffutils.py", line 374, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5.5-py2.6.egg/reviewboard/diffviewer/diffutils.py", line 242, in patch
    (filename, tempdir, patch_output))
Exception: The patch to 'trunk/KDE/kdeutils/ark/app/ark_servicemenu.desktop' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.1xqXh3' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.1xqXh3/tmppbNYUg
patch: **** unexpected end of file in patch

What operating system are you using? What browser?
Fedora 15, Firefox 4.0.1
#1 david
How did you create your diff? How did you create the review request?
  • +NeedInfo
#2 natet*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I am having the same issue on 1.5.5 - it appears (at least for me, can't speak for the op) to be a svn:keywords issue.

my diff:
Index: //trunk/tools/install.py
--- //trunk/tools/install.py	(revision 7)
+++ //trunk/tools/install.py	(revision 8)
@@ -11,7 +11,7 @@
-#  $Logfile: $
+#  $HeadURL$
 #  $Revision$
 #  $Date$
 #  $Author$

Whereas that section of the actual text of revision 7 of the file (the specified "temporary file" in the traceback) appears as so:
#  $Logfile: $
#  $Revision: 7 $
#  $Date: 2011-06-20 15:54:47 -0400 (Mon, 20 Jun 2011) $
#  $Author: someuser $
#3 natet*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Okay, I *think* I know what's causing *my* problem, but now I'm not sure that this is the same bug - it just appears to be.  After banging my head against the code for a couple hours, though, I'm still not quite sure the best way to fix it.

The issue is that in SVNTool.get_file, normpath is not correct - somehow, for me, "path" gets passed in as "//trunk/tools/install.py" (it is stored in the db this way), and normpath becomes "svn://my.svn.url/repo//trunk/tools/install.py", which is not what is returned by self.client.propget - it returns "svn://my.svn.url/repo/trunk/tools/install.py".

So, mine is either a bug in generating the diff entry (as it should not have two leading slashes when stored - and if I build a command with `svn diff`, just like post-review does, my repo returns the files without slashes, so that's being added somehow in post processing, before the diff model is saved), or it's intended to be saved with two slashes, and there is an error with processing it in __normalize_revision
#4 natet*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I have submitted a patch in a review at http://reviews.reviewboard.org/r/2441/ (and, eroneously, a pull request on github)
#5 david
  • -NeedInfo
#6 david
Pushed to release-1.6.x (3d5ad9c). Thanks, and sorry for the wait.
  • -PendingReview