From 6b31c0b98a5e6796bcbaea4dea5ec15525433102 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 4 Feb 2015 06:53:58 +1100 Subject: [PATCH] List supported VCS for `arc backout` Summary: This workflow does not work on subversion. Test Plan: N/A Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11625 --- src/workflow/ArcanistBackoutWorkflow.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/workflow/ArcanistBackoutWorkflow.php b/src/workflow/ArcanistBackoutWorkflow.php index 7131d777..57e3c222 100644 --- a/src/workflow/ArcanistBackoutWorkflow.php +++ b/src/workflow/ArcanistBackoutWorkflow.php @@ -22,7 +22,7 @@ EOTEXT public function getCommandHelp() { return phutil_console_format(<< | Entering a differential revision will only work if there is only one commit associated with the revision. This requires your working copy is up to date @@ -125,6 +125,10 @@ EOTEXT return $template; } + public function getSupportedRevisionControlSystems() { + return array('git', 'hg'); + } + /** * Performs the backout/revert of a revision and creates a commit. */ @@ -139,13 +143,6 @@ EOTEXT $repository_api->isHgSubversionRepo(); $revision_id = null; - if (!($repository_api instanceof ArcanistGitAPI) && - !($repository_api instanceof ArcanistMercurialAPI)) { - throw new ArcanistUsageException( - 'Backout currently only supports Git and Mercurial' - ); - } - $console->writeOut("Starting backout\n"); $input = $this->getArgument('input'); if (!$input || count($input) != 1) {