1581: Diff veivew error on RBTools 0.2rc1

seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
March 21, 2011
What version are you running?
Reviewboard 1.0.6
RBTools 0.2rc1

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

What steps will reproduce the problem?
1.Create a pending chagnelist on Perforce
2.post review quest with the change number

What is the expected output? What do you see instead?
On the review page, I get these errors.

Diff currently unavailable.
Error: The patch to '//depot/xxx.cpp' didn't apply cleanly. The temporary
files have been left in 'c:\windows\temp\reviewboard.n2gz7y' for debugging
purposes. `patch` returned: patching file
c:\windows\temp\reviewboard.n2gz7y\tmpgzs27h Hunk #1 FAILED at 1. 1 out of
1 hunk FAILED -- saving rejects to file
c:\windows\temp\reviewboard.n2gz7y\tmpgzs27h-new.rej
Details

Traceback (most recent call last):
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.6-py2.5.egg\reviewboard\diffviewer\views.py",
line 214, in view_diff_fragment
    file = get_requested_diff_file()
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.6-py2.5.egg\reviewboard\diffviewer\views.py",
line 190, in get_requested_diff_file
    get_chunks)
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.6-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 623, in get_diff_files
    large_data=True)
  File
"c:\python25\lib\site-packages\Djblets-0.5.9-py2.5.egg\djblets\util\misc.py",
line 166, in cache_memoize
    data = lookup_callable()
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.6-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 622, in <lambda>
    enable_syntax_highlighting),
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.6-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 345, in get_chunks
    new = get_patched_file(old, filediff)
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.6-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 261, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
  File
"c:\python25\lib\site-packages\ReviewBoard-1.0.6-py2.5.egg\reviewboard\diffviewer\diffutils.py",
line 129, in patch
    (filename, tempdir, patch_output))
Exception: The patch to '//depot/xxx.cpp' didn't apply cleanly. The
temporary files have been left in 'c:\windows\temp\reviewboard.n2gz7y' for
debugging purposes.
`patch` returned: patching file c:\windows\temp\reviewboard.n2gz7y\tmpgzs27h
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file
c:\windows\temp\reviewboard.n2gz7y\tmpgzs27h-new.rej

What operating system are you using? What browser?
Windows Vista/7, IE8/Firefox 3.6.2

Please provide any additional information below.
Even I upgrade RBTools to the latest version on GitHub, it doesn't work.
But RBTools 0.2beta2 works well. I believe the postreview.py cause the issue.
chipx86
#1 chipx86
Can you run with --output-diff and see if it looks as you'd expect? Also look in that
temp directory on the server (if you have access) to see what the .rej file looks like.
  • +NeedInfo
#2 seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I run with --output-diff. All look good, but on the web page, the issue still exists.
I use the reviewboard server on Windows, and the .rej file looks good, too. I am
confusing. What should I do next?
#4 seagl*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I found some threads. If there is the symbol "©" in the file, I will get the issue,
and in .rej file, it's changed to "�". I use Chinese locale. I changed to English
locale, the issues still exists. The charater encoding issue?
I uploaded log.zip. Please refer to the attachment for details.
david
#5 david
We haven't seen this in >=1.5. Please reopen if you disagree (make sure it's with a newly posted diff, too).
  • -NeedInfo
    +Fixed