#!/usr/bin/env php setTagline('manually discover working copies'); $args->setSynopsis(<<parseStandardArguments(); $args->parse( array( array( 'name' => 'repositories', 'wildcard' => true, ), )); $repo_names = $args->getArg('repositories'); if (!$repo_names) { echo "Specify one or more repositories to pull, by callsign or PHID.\n"; exit(1); } $repos = PhabricatorRepository::loadAllByPHIDOrCallsign($repo_names); foreach ($repos as $repo) { $callsign = $repo->getCallsign(); echo "Discovering '{$callsign}'...\n"; PhabricatorRepositoryPullLocalDaemon::discoverRepository($repo); } echo "Done.\n";