Changeset View
Changeset View
Standalone View
Standalone View
scripts/symbols/import_repository_symbols.php
| Show All 29 Lines | array( | ||||
| 'name' => 'max-transaction', | 'name' => 'max-transaction', | ||||
| 'param' => 'num-syms', | 'param' => 'num-syms', | ||||
| 'default' => '100000', | 'default' => '100000', | ||||
| 'help' => pht( | 'help' => pht( | ||||
| 'Maximum number of symbols that should '. | 'Maximum number of symbols that should '. | ||||
| 'be part of a single transaction.'), | 'be part of a single transaction.'), | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'name' => 'more', | 'name' => 'callsign', | ||||
| 'wildcard' => true, | 'wildcard' => true, | ||||
| ), | ), | ||||
| )); | )); | ||||
| $more = $args->getArg('more'); | $callsigns = $args->getArg('callsign'); | ||||
| if (count($more) !== 1) { | if (count($callsigns) !== 1) { | ||||
| $args->printHelpAndExit(); | $args->printHelpAndExit(); | ||||
| } | } | ||||
| $callsign = head($more); | $callsign = head($callsigns); | ||||
| $repository = id(new PhabricatorRepository())->loadOneWhere( | $repository = id(new PhabricatorRepositoryQuery()) | ||||
| 'callsign = %s', | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
| $callsign); | ->withCallsigns($callsigns) | ||||
| ->executeOne(); | |||||
| if (!$repository) { | if (!$repository) { | ||||
| echo pht("Repository '%s' does not exist.", $callsign); | echo pht("Repository '%s' does not exist.", $callsign); | ||||
| exit(1); | exit(1); | ||||
| } | } | ||||
| if (!function_exists('posix_isatty') || posix_isatty(STDIN)) { | if (!function_exists('posix_isatty') || posix_isatty(STDIN)) { | ||||
| echo pht('Parsing input from stdin...'), "\n"; | echo pht('Parsing input from stdin...'), "\n"; | ||||
| ▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines | |||||