]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Change "any" to explicitly list revision control systems
authorJoshua Spence <josh@joshuaspence.com>
Mon, 2 Feb 2015 07:18:36 +0000 (18:18 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 2 Feb 2015 07:19:29 +0000 (18:19 +1100)
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
src/workflow/ArcanistWorkflow.php

index 0cd9571e99c521ce8a2457d2b34bbd74c6e4af70..e5a2aacf9b8d384992d9cd2e95954aec635c7e7c 100644 (file)
@@ -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;
         }
 
index 8f4dc3aaec4e60ec37e6deb2c6327c02739a3fcd..56fad6dc92836246f28a25e5216fb984f799d0ab 100644 (file)
@@ -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) {