]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Catch ArcanistUsageException when getting git parent log info
authorNick Harper <nharper@fb.com>
Tue, 8 May 2012 23:31:26 +0000 (16:31 -0700)
committerNick Harper <nharper@fb.com>
Wed, 9 May 2012 00:32:54 +0000 (17:32 -0700)
Summary:
ArcanistDiffWorkflow::getGitParentLogInfo() calls
ArcanistDifferentialCommitMessage::newFromRawCorpus() which may throw a
ArcanistUsageException if the parent commit message is malformed (specifically,
a bad "Differential Revision:" line); this should not stop arc diff.

Test Plan: successfully ran arc diff where the parent commit message was malformed.

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran, Koolvin
Differential Revision: https://secure.phabricator.com/D2434

src/workflow/diff/ArcanistDiffWorkflow.php

index 034778b3870740a1df4c2ecafe65a4ab2df52bb8..85a86e83aaac566440a3cf2a968f8b230dd57c16 100644 (file)
@@ -996,6 +996,8 @@ EOTEXT
         }
       } catch (ArcanistDifferentialCommitMessageParserException $ex) {
         // Ignore.
+      } catch (ArcanistUsageException $ex) {
+        // Ignore an invalid Differential Revision field in the parent commit
       }
     }