~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to arcanist/src/workflow/ArcanistBranchWorkflow.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-10-23 20:49:26 UTC
  • mfrom: (0.2.1) (0.1.1)
  • Revision ID: package-import@ubuntu.com-20141023204926-vq80u1op4df44azb
Tags: 0~git20141023-1
Initial release (closes: #703046)

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 ArcanistBranchWorkflow extends ArcanistFeatureWorkflow {
 
7
 
 
8
  public function getWorkflowName() {
 
9
    return 'branch';
 
10
  }
 
11
 
 
12
  public function getCommandSynopses() {
 
13
    return phutil_console_format(<<<EOTEXT
 
14
      **branch** [__options__]
 
15
      **branch** __name__ [__start__]
 
16
EOTEXT
 
17
      );
 
18
  }
 
19
 
 
20
  public function getCommandHelp() {
 
21
    return phutil_console_format(<<<EOTEXT
 
22
          Supports: git
 
23
          Alias for arc feature.
 
24
EOTEXT
 
25
      );
 
26
  }
 
27
 
 
28
  public function run() {
 
29
    $repository_api = $this->getRepositoryAPI();
 
30
    if (!($repository_api instanceof ArcanistGitAPI)) {
 
31
      throw new ArcanistUsageException(
 
32
        'arc branch is only supported under Git.');
 
33
    }
 
34
    return parent::run();
 
35
  }
 
36
 
 
37
}