1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

Remove various additional calls to getCallsign()

Summary: Ref T4245. These are all straightforward to remove.

Test Plan:
- Edited paths in a package.
- Ran `bin/audit delete --repositories ...` with various identifiers.
- Searched by repository for `R3`, `rAAAA` in Harbormaster.
- Did a Herald dry run on a commit.
- Browsed commits, made comments.
- Viewed a Releeph product list.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D14927
This commit is contained in:
epriestley 2016-01-02 06:16:49 -08:00
parent d9e034f02c
commit 37532a0bf0
8 changed files with 21 additions and 23 deletions

View file

@ -46,7 +46,7 @@ final class PhabricatorAuditCommentEditor extends PhabricatorEditor {
'diffusion-audit-'.$commit->getPHID(), 'diffusion-audit-'.$commit->getPHID(),
pht( pht(
'Commit %s', 'Commit %s',
'r'.$repository->getCallsign().$commit->getCommitIdentifier()), $commit->getMonogram()),
); );
} }

View file

@ -222,22 +222,23 @@ final class PhabricatorAuditManagementDeleteWorkflow
return $list; return $list;
} }
private function loadRepos($callsigns) { private function loadRepos($identifiers) {
$callsigns = $this->parseList($callsigns); $identifiers = $this->parseList($identifiers);
if (!$callsigns) { if (!$identifiers) {
return null; return null;
} }
$repos = id(new PhabricatorRepositoryQuery()) $query = id(new PhabricatorRepositoryQuery())
->setViewer($this->getViewer()) ->setViewer($this->getViewer())
->withCallsigns($callsigns) ->withIdentifiers($identifiers);
->execute();
$repos = mpull($repos, null, 'getCallsign');
foreach ($callsigns as $sign) { $repos = $query->execute();
if (empty($repos[$sign])) {
$map = $query->getIdentifierMap();
foreach ($identifiers as $identifier) {
if (empty($map[$identifier])) {
throw new PhutilArgumentUsageException( throw new PhutilArgumentUsageException(
pht('No such repository with callsign "%s"!', $sign)); pht('No repository "%s" exists!', $identifier));
} }
} }

View file

@ -130,10 +130,7 @@ final class HeraldCommitAdapter
} }
public function getHeraldName() { public function getHeraldName() {
return return $this->commit->getMonogram();
'r'.
$this->repository->getCallsign().
$this->commit->getCommitIdentifier();
} }
public function loadAffectedPaths() { public function loadAffectedPaths() {

View file

@ -112,7 +112,7 @@ final class HarbormasterBuildableSearchEngine
} else if ($object instanceof DifferentialDiff) { } else if ($object instanceof DifferentialDiff) {
$diff_names[] = $object->getID(); $diff_names[] = $object->getID();
} else if ($object instanceof PhabricatorRepository) { } else if ($object instanceof PhabricatorRepository) {
$repository_names[] = 'r'.$object->getCallsign(); $repository_names[] = $object->getMonogram();
} else if ($object instanceof PhabricatorRepositoryCommit) { } else if ($object instanceof PhabricatorRepositoryCommit) {
$repository = $object->getRepository(); $repository = $object->getRepository();
$commit_names[] = $repository->formatCommitName( $commit_names[] = $repository->formatCommitName(

View file

@ -83,7 +83,7 @@ final class PhabricatorOwnersPathsController
} }
} }
$repos = mpull($repos, 'getCallsign', 'getPHID'); $repos = mpull($repos, 'getMonogram', 'getPHID');
asort($repos); asort($repos);
$template = new AphrontTypeaheadTemplateView(); $template = new AphrontTypeaheadTemplateView();

View file

@ -121,11 +121,11 @@ final class ReleephProductCreateController extends ReleephProductController {
foreach ($repos as $repo_id => $repo) { foreach ($repos as $repo_id => $repo) {
$repo_name = $repo->getName(); $repo_name = $repo->getName();
$callsign = $repo->getCallsign(); $display = $repo->getDisplayName();
$choices[$repo->getPHID()] = "r{$callsign} ({$repo_name})"; $choices[$repo->getPHID()] = "{$display} ({$repo_name})";
} }
ksort($choices); asort($choices);
return $choices; return $choices;
} }

View file

@ -372,7 +372,7 @@ final class DifferentialReleephRequestFieldSpecification extends Phobject {
'part of a Releeph branch, but also has %d path change(s) not '. 'part of a Releeph branch, but also has %d path change(s) not '.
'part of a Releeph branch!', 'part of a Releeph branch!',
$commit->getCommitIdentifier(), $commit->getCommitIdentifier(),
$repo->getCallsign(), $repo->getDisplayName(),
count($in_branch), count($in_branch),
count($ex_branch)); count($ex_branch));
phlog($error); phlog($error);

View file

@ -114,9 +114,9 @@ final class ReleephProductSearchEngine
phutil_tag( phutil_tag(
'a', 'a',
array( array(
'href' => '/diffusion/'.$repo->getCallsign().'/', 'href' => $repo->getURI(),
), ),
'r'.$repo->getCallsign())); $repo->getMonogram()));
$list->addItem($item); $list->addItem($item);
} }