3 final class PhabricatorRepositoryManagementDiscoverWorkflow
4 extends PhabricatorRepositoryManagementWorkflow
{
6 protected function didConstruct() {
9 ->setExamples('**discover** [__options__] __repository__ ...')
10 ->setSynopsis(pht('Discover commits in __repository__.'))
15 'help' => pht('Show additional debugging information.'),
20 'Discover all commits, even if they are ancestors of known '.
21 'commits. This can repair gaps in repository history.'),
30 public function execute(PhutilArgumentParser
$args) {
31 $repos = $this->loadLocalRepositories($args, 'repos');
34 throw new PhutilArgumentUsageException(
35 pht('Specify one or more repositories to discover.'));
38 $console = PhutilConsole
::getConsole();
39 foreach ($repos as $repo) {
43 'Discovering "%s"...',
44 $repo->getDisplayName()));
46 id(new PhabricatorRepositoryDiscoveryEngine())
47 ->setRepository($repo)
48 ->setVerbose($args->getArg('verbose'))
49 ->setRepairMode($args->getArg('repair'))
53 $console->writeOut("%s\n", pht('Done.'));