From: vrana Date: Fri, 4 May 2012 19:22:47 +0000 (-0700) Subject: Warn before parse errors in `arc diff --verbatim` X-Git-Tag: conduit-4~26 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=4d1e5b1b7403ac98dcd9535733e2570cbad23413;p=arcanist.git Warn before parse errors in `arc diff --verbatim` Summary: With `--verbatim` flag, notes created from parse errors are never displayed to user resulting in blank fields. Test Plan: - `arc diff --verbatim` with invalid Cc - `arc diff --verbatim` with all fields correct Reviewers: epriestley, jungejason Reviewed By: epriestley CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2395 --- diff --git a/src/workflow/diff/ArcanistDiffWorkflow.php b/src/workflow/diff/ArcanistDiffWorkflow.php index bff1cde6..c3f38e5f 100644 --- a/src/workflow/diff/ArcanistDiffWorkflow.php +++ b/src/workflow/diff/ArcanistDiffWorkflow.php @@ -1598,6 +1598,10 @@ EOTEXT $message->pullDataFromConduit($conduit, $partial = true); $fields += $message->getFields(); } catch (ArcanistDifferentialCommitMessageParserException $ex) { + if ($this->getArgument('verbatim')) { + throw $ex; + } + $fields += $message->getFields(); $frev = substr($hash, 0, 8);