From 3250cbb4d372d11f538420fe6c64424e6c9582cc Mon Sep 17 00:00:00 2001 From: mgummelt Date: Thu, 8 Sep 2011 17:36:20 -0700 Subject: [PATCH] two small changes for "arc unit" post hook Summary: 1) unit engine getter method in the unit workflow we store some information (unit test results) in the engine that we need to access in the "arc unit" post hook 2) make requireCleanWorkingCopy() public "arc unit" doesn't need to be clean in general, but we'd like the option to upgrade the workflow to require it if necessary. We use this for ensuring a repo is clean before updating unit test results. Test Plan: Used both features in a custom post hook in arc unit Reviewers: epriestley Reviewed By: epriestley CC: dpepper, aran, epriestley Differential Revision: 917 --- src/workflow/base/ArcanistBaseWorkflow.php | 2 +- src/workflow/unit/ArcanistUnitWorkflow.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/workflow/base/ArcanistBaseWorkflow.php b/src/workflow/base/ArcanistBaseWorkflow.php index 7d0de227..b7fe41c4 100644 --- a/src/workflow/base/ArcanistBaseWorkflow.php +++ b/src/workflow/base/ArcanistBaseWorkflow.php @@ -573,7 +573,7 @@ class ArcanistBaseWorkflow { return empty($this->arguments['allow-untracked']); } - protected function requireCleanWorkingCopy() { + public function requireCleanWorkingCopy() { $api = $this->getRepositoryAPI(); $working_copy_desc = phutil_console_format( diff --git a/src/workflow/unit/ArcanistUnitWorkflow.php b/src/workflow/unit/ArcanistUnitWorkflow.php index d6c14a0a..10488905 100644 --- a/src/workflow/unit/ArcanistUnitWorkflow.php +++ b/src/workflow/unit/ArcanistUnitWorkflow.php @@ -60,6 +60,10 @@ EOTEXT return true; } + public function getEngine() { + return $this->engine; + } + public function run() { $working_copy = $this->getWorkingCopy(); -- 2.43.0