]> khamidou — GitHub mirrors - arcanist.git/commit
make arc issue a warning if file upload fails during diff creation
authorBob Trahan <bob.trahan@gmail.com>
Thu, 10 Nov 2011 03:44:53 +0000 (19:44 -0800)
committerBob Trahan <bob.trahan@gmail.com>
Sat, 12 Nov 2011 17:57:22 +0000 (09:57 -0800)
commit16caf63d98f9b65b75a036dd45e1089f29a16da1
tree618be782ad723ed454c951e36c36a72c1b918657
parent28eae6082139ccde5b2c98c9cf3fbda0059813e4
make arc issue a warning if file upload fails during diff creation

Summary:
just a little try / catch action in ArcanistDiffWorkflow.

"Ideally, it would be good to flag these changes somehow so that "arc patch" can
issue the inverse warning (e.g., "This patch could not be completely applied
because some binary data was not uploaded.") but that hasn't come up in a real
use case yet."

I think a change w/ filetype of FILE_IMAGE || FILE_BINARY *and* no phid means
that the upload failed so there's no additional flag needed.  (True?)  however,
it would be easy enough to store metadata that explicilty stated whether or not
the file upload succeeded.

(also / related - i looked through the arc patch workflow a bit and i don't
understand how the svn codepath loads up the actual binary files...  for git,
toGitPatch => buildBinaryChange => getBlob is the right path )

Test Plan:
 - set 'storage.mysql-engine.max-size' to 0 in my conf, uploaded diffs with
files
 - noted in differential that it correctly detected images versus binary despite
file upload failing
 - noted in differential that images had some empty UI
 - reverted conf change, uploaded diffs with files
 - noted in differential file showed up
 - ran arc patch with DX, where DX had broken files
 - noted "Downloading binary data...

Exception:
ERR-BAD-PHID: No such file exists."

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: 1100
src/workflow/diff/ArcanistDiffWorkflow.php