This change puts all Review Board temporary patch files in a subdirectory of the host operating system's temporary directory, which will be prefixed with "reviewboard.".  Successful patches are deleted normally, but files (the original, patchfile, and .rej file) that are part of a failed patch will be left for debugging.
This change puts all Review Board temporary patch files in a subdirectory of the
host operating system's temporary directory, which will be prefixed with
"reviewboard.".  Successful patches are deleted normally, but files (the
original, patchfile, and .rej file) that are part of a failed patch will be left
for debugging.

This still isn't the absolutely correct way to handle this error.  If someone
will make the view enclose the error text in a preformatted block, I will gladly
revise this to output patch's output alongside the rejected portions, but as it
stands, newlines are not respected.

Example error output:

The patch to 'near-time.net/branches/bug/3737/app/models/page.rb' didn't apply
cleanly. The temporary files have been left in '/tmp/reviewboard.r632GW' for
debugging purposes.
`patch` returned:
patching file /tmp/reviewboard.r632GW/tmpt8UkeH Hunk #1 FAILED at 20.
1 out of 1 hunk FAILED --
saving rejects to file /tmp/reviewboard.r632GW/tmpt8UkeH-new.rej

Reviewed at http://reviews.review-board.org/r/101/





chazy/reviewboard,custode/reviewboard,1tush/reviewboard,1tush/reviewboard,chazy/reviewboard,chipx86/reviewboard,bkochendorfer/reviewboard,beol/reviewboard,reviewboard/reviewboard,Khan/reviewboard,brennie/reviewboard,beol/reviewboard,chazy/reviewboard,bkochendorfer/reviewboard,sgallagher/reviewboard,Khan/reviewboard,atagar/ReviewBoard,chipx86/reviewboard,reviewboard/reviewboard,chazy/reviewboard,davidt/reviewboard,1tush/reviewboard,brennie/reviewboard,chazy/reviewboard,reviewboard/reviewboard,KnowNo/reviewboard,Khan/reviewboard,custode/reviewboard,davidt/reviewboard,Khan/reviewboard,chipx86/reviewboard,chazy/reviewboard,atagar/ReviewBoard,atagar/ReviewBoard,beol/reviewboard,Khan/reviewboard,bkochendorfer/reviewboard,reviewboard/reviewboard,atagar/ReviewBoard,KnowNo/reviewboard,chazy/reviewboard,chazy/reviewboard,1tush/reviewboard,atagar/ReviewBoard,chazy/reviewboard,1tush/reviewboard,asutherland/opc-reviewboard,davidt/reviewboard,brennie/reviewboard,Khan/reviewboard,beol/reviewboard,1tush/reviewboard,davidt/reviewboard,Khan/reviewboard,1tush/reviewboard,chipx86/reviewboard,sgallagher/reviewboard,atagar/ReviewBoard,Khan/reviewboard,sgallagher/reviewboard,1tush/reviewboard,bkochendorfer/reviewboard,sgallagher/reviewboard,asutherland/opc-reviewboard,atagar/ReviewBoard,brennie/reviewboard,Khan/reviewboard,atagar/ReviewBoard,custode/reviewboard,custode/reviewboard,KnowNo/reviewboard,atagar/ReviewBoard,KnowNo/reviewboard,asutherland/opc-reviewboard,1tush/reviewboard,asutherland/opc-reviewboard