From b34915020eba8680a59069044b05223b89eea59e Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Tue, 8 May 2012 16:31:26 -0700 Subject: [PATCH] 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 --- src/workflow/diff/ArcanistDiffWorkflow.php | 2 ++ 1 file changed, 2 insertions(+) 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 } }