From: Nick Harper Date: Tue, 8 May 2012 23:31:26 +0000 (-0700) Subject: Catch ArcanistUsageException when getting git parent log info X-Git-Tag: conduit-4~13 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b34915020eba8680a59069044b05223b89eea59e;p=arcanist.git Catch ArcanistUsageException when getting git parent log info 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 --- diff --git a/src/workflow/diff/ArcanistDiffWorkflow.php b/src/workflow/diff/ArcanistDiffWorkflow.php index 034778b3..85a86e83 100644 --- a/src/workflow/diff/ArcanistDiffWorkflow.php +++ b/src/workflow/diff/ArcanistDiffWorkflow.php @@ -996,6 +996,8 @@ EOTEXT } } catch (ArcanistDifferentialCommitMessageParserException $ex) { // Ignore. + } catch (ArcanistUsageException $ex) { + // Ignore an invalid Differential Revision field in the parent commit } }