]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Warn before parse errors in `arc diff --verbatim`
authorvrana <jakubv@fb.com>
Fri, 4 May 2012 19:22:47 +0000 (12:22 -0700)
committervrana <jakubv@fb.com>
Fri, 4 May 2012 19:42:51 +0000 (12:42 -0700)
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

src/workflow/diff/ArcanistDiffWorkflow.php

index bff1cde64c3125c9a8484261348871f2801683d4..c3f38e5f6f96956d5709f28d19ebbd2e8eb3e7be 100644 (file)
@@ -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);