From 1dfe1f49f78064e479284748b47d385e520f0a96 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Mon, 4 May 2015 12:22:11 +1000 Subject: [PATCH] Fix a few issues with the "import symbols" script Summary: Ref T7977. Fix a few issues that I forgot to fix up. Test Plan: Run the script. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7977 Differential Revision: https://secure.phabricator.com/D12668 --- scripts/symbols/import_repository_symbols.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/symbols/import_repository_symbols.php b/scripts/symbols/import_repository_symbols.php index b429c3689d..14a83dda0c 100755 --- a/scripts/symbols/import_repository_symbols.php +++ b/scripts/symbols/import_repository_symbols.php @@ -35,20 +35,21 @@ $args->parse( 'be part of a single transaction.'), ), array( - 'name' => 'more', + 'name' => 'callsign', 'wildcard' => true, ), )); -$more = $args->getArg('more'); -if (count($more) !== 1) { +$callsigns = $args->getArg('callsign'); +if (count($callsigns) !== 1) { $args->printHelpAndExit(); } -$callsign = head($more); -$repository = id(new PhabricatorRepository())->loadOneWhere( - 'callsign = %s', - $callsign); +$callsign = head($callsigns); +$repository = id(new PhabricatorRepositoryQuery()) + ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->withCallsigns($callsigns) + ->executeOne(); if (!$repository) { echo pht("Repository '%s' does not exist.", $callsign);