From 623df14ae50bad97b9ba7148d8b6ab15ddef480c Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Mon, 2 Feb 2015 18:18:36 +1100 Subject: [PATCH] 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 --- src/workflow/ArcanistShellCompleteWorkflow.php | 5 +---- src/workflow/ArcanistWorkflow.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) 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) {