From: Joshua Spence Date: Mon, 2 Feb 2015 07:18:36 +0000 (+1100) Subject: Change "any" to explicitly list revision control systems X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=623df14ae50bad97b9ba7148d8b6ab15ddef480c;p=arcanist.git Change "any" to explicitly list revision control systems Summary: Using `array('any')` to represent `array('git', 'hg', 'svn')` is a bit magical and leads to a lot of special-casing. Test Plan: Verified that tab completion (ala `ArcanistShellCompleteWorkflow`) still worked. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11604 --- diff --git a/src/workflow/ArcanistShellCompleteWorkflow.php b/src/workflow/ArcanistShellCompleteWorkflow.php index 0cd9571e..e5a2aacf 100644 --- a/src/workflow/ArcanistShellCompleteWorkflow.php +++ b/src/workflow/ArcanistShellCompleteWorkflow.php @@ -82,10 +82,7 @@ EOTEXT continue; } - $supported = $workflow->getSupportedRevisionControlSystems(); - - $ok = (in_array('any', $supported) || in_array($vcs, $supported)); - if (!$ok) { + if (!in_array($vcs, $workflow->getSupportedRevisionControlSystems())) { continue; } diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php index 8f4dc3aa..56fad6dc 100644 --- a/src/workflow/ArcanistWorkflow.php +++ b/src/workflow/ArcanistWorkflow.php @@ -1216,7 +1216,7 @@ abstract class ArcanistWorkflow extends Phobject { } protected function getSupportedRevisionControlSystems() { - return array('any'); + return array('git', 'hg', 'svn'); } final protected function getPassthruArgumentsAsMap($command) {