]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Only allow `arc branch` to be used under `git`
authorJoshua Spence <josh@joshuaspence.com>
Tue, 3 Feb 2015 19:58:53 +0000 (06:58 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 3 Feb 2015 19:58:53 +0000 (06:58 +1100)
Summary: Explicitly declare that the `arc branch` command is only supported under `git`.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11552

src/workflow/ArcanistBranchWorkflow.php

index 29d3b7b1a606532d92a31322ae654ff19fe83776..7c980ef430b8ca71403a18a6a3c0c9ac1fb56bbb 100644 (file)
@@ -25,12 +25,11 @@ EOTEXT
       );
   }
 
+  public function getSupportedRevisionControlSystems() {
+    return array('git');
+  }
+
   public function run() {
-    $repository_api = $this->getRepositoryAPI();
-    if (!($repository_api instanceof ArcanistGitAPI)) {
-      throw new ArcanistUsageException(
-        'arc branch is only supported under Git.');
-    }
     return parent::run();
   }