From: mgummelt Date: Fri, 9 Sep 2011 00:36:20 +0000 (-0700) Subject: two small changes for "arc unit" post hook X-Git-Tag: conduit-4~283 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3250cbb4d372d11f538420fe6c64424e6c9582cc;p=arcanist.git 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 --- 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();