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

New issue 2065 by patch fails when trying to view patch

What version are you running?


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


What steps will reproduce the problem?

1. Put into a sub directory. (eg. /repo/review/)
2. Upload console.patch for review.
3. Try to view the patch.

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

Instead of difference, a Python traceback is shown:

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ReviewBoard-1.5.4-py2.7.egg/reviewboard/diffviewer/", line 378, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)

(Full traceback attached.)

patch() method executes this command, imho this is wrong:

patch -o /tmp/reviewboard.Tvwttz/tmpP37ele-new /tmp/reviewboard.Tvwttz/tmpP37ele < /tmp/reviewboard.Tvwttz/

patch command fails:
  "invalid output file name: /tmp/reviewboard.Tvwttz/tmpP37ele"

Changing working directory and running patch works fine:
  cd /tmp/reviewboard.Tvwttz/
  patch -o tmpP37ele-new tmpP37ele <

IMHO, an os.chdir() will fix this.

Attachments:  404 bytes
        console.patch  382 bytes
        traceback.log  1.4 KB

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to