~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to src/workflow/ArcanistBookmarkWorkflow.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-11-01 23:20:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20141101232006-mvlnp0cil67tsboe
Tags: upstream-0~git20141101/arcanist
Import upstream version 0~git20141101, component arcanist

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * Alias for `arc feature`.
 
5
 */
 
6
final class ArcanistBookmarkWorkflow extends ArcanistFeatureWorkflow {
 
7
 
 
8
  public function getWorkflowName() {
 
9
    return 'bookmark';
 
10
  }
 
11
 
 
12
  public function getCommandSynopses() {
 
13
    return phutil_console_format(<<<EOTEXT
 
14
      **bookmark** [__options__]
 
15
      **bookmark** __name__ [__start__]
 
16
EOTEXT
 
17
      );
 
18
  }
 
19
 
 
20
  public function getCommandHelp() {
 
21
    return phutil_console_format(<<<EOTEXT
 
22
          Supports: hg
 
23
          Alias for arc feature.
 
24
EOTEXT
 
25
      );
 
26
  }
 
27
 
 
28
  public function run() {
 
29
    $repository_api = $this->getRepositoryAPI();
 
30
    if (!($repository_api instanceof ArcanistMercurialAPI)) {
 
31
      throw new ArcanistUsageException(
 
32
        'arc bookmark is only supported under Mercurial.');
 
33
    }
 
34
    return parent::run();
 
35
  }
 
36
 
 
37
}