Differential D21544 Diff 51282 src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/management/PhabricatorRepositoryManagementPullWorkflow.php
| Show All 9 Lines | $this | ||||
| ->setSynopsis(pht('Pull __repository__.')) | ->setSynopsis(pht('Pull __repository__.')) | ||||
| ->setArguments( | ->setArguments( | ||||
| array( | array( | ||||
| array( | array( | ||||
| 'name' => 'verbose', | 'name' => 'verbose', | ||||
| 'help' => pht('Show additional debugging information.'), | 'help' => pht('Show additional debugging information.'), | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'name' => 'ignore-locality', | |||||
| 'help' => pht( | |||||
| 'Pull even if the repository should not be present on this '. | |||||
| 'host according to repository cluster configuration.'), | |||||
| ), | |||||
| array( | |||||
| 'name' => 'repos', | 'name' => 'repos', | ||||
| 'wildcard' => true, | 'wildcard' => true, | ||||
| ), | ), | ||||
| )); | )); | ||||
| } | } | ||||
| public function execute(PhutilArgumentParser $args) { | public function execute(PhutilArgumentParser $args) { | ||||
| $repos = $this->loadLocalRepositories($args, 'repos'); | $ignore_locality = (bool)$args->getArg('ignore-locality'); | ||||
| $repos = $this->loadLocalRepositories($args, 'repos', $ignore_locality); | |||||
| if (!$repos) { | if (!$repos) { | ||||
| throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
| pht('Specify one or more repositories to pull.')); | pht('Specify one or more repositories to pull.')); | ||||
| } | } | ||||
| $console = PhutilConsole::getConsole(); | $console = PhutilConsole::getConsole(); | ||||
| foreach ($repos as $repo) { | foreach ($repos as $repo) { | ||||
| $console->writeOut( | $console->writeOut( | ||||
| Show All 17 Lines | |||||