From 77eb24b13afbf1d578feb3a7ef2a5e05738ef387 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 4 Feb 2015 06:58:53 +1100 Subject: [PATCH] Only allow `arc branch` to be used under `git` 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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/workflow/ArcanistBranchWorkflow.php b/src/workflow/ArcanistBranchWorkflow.php index 29d3b7b1..7c980ef4 100644 --- a/src/workflow/ArcanistBranchWorkflow.php +++ b/src/workflow/ArcanistBranchWorkflow.php @@ -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(); } -- 2.43.0