]> khamidou — GitHub mirrors - arcanist.git/commitdiff
List supported VCS for `arc backout`
authorJoshua Spence <josh@joshuaspence.com>
Tue, 3 Feb 2015 19:53:58 +0000 (06:53 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Tue, 3 Feb 2015 19:53:58 +0000 (06:53 +1100)
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

index 7131d7773287315e6c10c5f310584eeaa4330151..57e3c22211cabea96716999dc5c0e2488489311c 100644 (file)
@@ -22,7 +22,7 @@ EOTEXT
 
   public function getCommandHelp() {
     return phutil_console_format(<<<EOTEXT
-          Reverts/backouts on a previous commit. Supports: git
+          Reverts/backouts on a previous commit. Supports: git, hg
    Command is used like this: arc backout <commithash> | <diff revision>
    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) {