3 final class PhabricatorRepositoryManagementPullWorkflow
4 extends PhabricatorRepositoryManagementWorkflow
{
6 protected function didConstruct() {
9 ->setExamples('**pull** __repository__ ...')
10 ->setSynopsis(pht('Pull __repository__.'))
15 'help' => pht('Show additional debugging information.'),
18 'name' => 'ignore-locality',
20 'Pull even if the repository should not be present on this '.
21 'host according to repository cluster configuration.'),
30 public function execute(PhutilArgumentParser
$args) {
31 $ignore_locality = (bool)$args->getArg('ignore-locality');
33 $repos = $this->loadLocalRepositories($args, 'repos', $ignore_locality);
35 throw new PhutilArgumentUsageException(
36 pht('Specify one or more repositories to pull.'));
39 $console = PhutilConsole
::getConsole();
40 foreach ($repos as $repo) {
45 $repo->getDisplayName()));
47 id(new PhabricatorRepositoryPullEngine())
48 ->setRepository($repo)
49 ->setVerbose($args->getArg('verbose'))
53 $console->writeOut("%s\n", pht('Done.'));