Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistFeatureBaseWorkflow.php
- This file was copied from src/workflow/ArcanistFeatureWorkflow.php.
<?php | <?php | ||||
class ArcanistFeatureWorkflow | abstract class ArcanistFeatureBaseWorkflow | ||||
extends ArcanistArcWorkflow { | extends ArcanistArcWorkflow { | ||||
private $branches; | private $branches; | ||||
public function getWorkflowName() { | |||||
return 'feature'; | |||||
} | |||||
public function getWorkflowArguments() { | public function getWorkflowArguments() { | ||||
return array( | return array( | ||||
$this->newWorkflowArgument('view-all') | $this->newWorkflowArgument('view-all') | ||||
->setHelp(pht('Include closed and abandoned revisions.')), | ->setHelp(pht('Include closed and abandoned revisions.')), | ||||
$this->newWorkflowArgument('by-status') | $this->newWorkflowArgument('by-status') | ||||
->setParameter('status') | ->setParameter('status') | ||||
->setHelp(pht('Sort branches by status instead of time.')), | ->setHelp(pht('Sort branches by status instead of time.')), | ||||
$this->newWorkflowArgument('output') | $this->newWorkflowArgument('output') | ||||
->setParameter('format') | ->setParameter('format') | ||||
->setHelp( | ->setHelp( | ||||
pht( | pht( | ||||
'With "json", show features in machine-readable JSON format.')), | 'With "json", show features in machine-readable JSON format.')), | ||||
$this->newWorkflowArgument('branch') | $this->newWorkflowArgument('branch') | ||||
->setWildcard(true), | ->setWildcard(true), | ||||
); | ); | ||||
} | } | ||||
public function getWorkflowInformation() { | public function getWorkflowInformation() { | ||||
return $this->newWorkflowInformation() | return $this->newWorkflowInformation() | ||||
->setSynopsis(pht('Wrapper on "git branch" or "hg bookmark".')) | ->setSynopsis(pht('Wrapper on "git branch" or "hg bookmark".')) | ||||
->addExample(pht('**feature** [__options__]')) | ->addExample(pht('**%s** [__options__]', $this->getWorkflowName())) | ||||
->addExample(pht('**feature** __name__ [__start__]')) | ->addExample(pht('**%s** __name__ [__start__]', $this->getWorkflowName())) | ||||
->setHelp( | ->setHelp( | ||||
pht(<<<EOHELP | pht(<<<EOHELP | ||||
A wrapper on 'git branch' or 'hg bookmark'. | A wrapper on 'git branch' or 'hg bookmark'. | ||||
Without __name__, it lists the available branches and their revision status. | Without __name__, it lists the available branches and their revision status. | ||||
With __name__, it creates or checks out a branch. If the branch __name__ | With __name__, it creates or checks out a branch. If the branch __name__ | ||||
doesn't exist and is in format D123 then the branch of revision D123 is | doesn't exist and is in format D123 then the branch of revision D123 is | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |