@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+21 -23
+1 -1
src/applications/audit/editor/PhabricatorAuditCommentEditor.php
··· 46 46 'diffusion-audit-'.$commit->getPHID(), 47 47 pht( 48 48 'Commit %s', 49 - 'r'.$repository->getCallsign().$commit->getCommitIdentifier()), 49 + $commit->getMonogram()), 50 50 ); 51 51 } 52 52
+11 -10
src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php
··· 222 222 return $list; 223 223 } 224 224 225 - private function loadRepos($callsigns) { 226 - $callsigns = $this->parseList($callsigns); 227 - if (!$callsigns) { 225 + private function loadRepos($identifiers) { 226 + $identifiers = $this->parseList($identifiers); 227 + if (!$identifiers) { 228 228 return null; 229 229 } 230 230 231 - $repos = id(new PhabricatorRepositoryQuery()) 231 + $query = id(new PhabricatorRepositoryQuery()) 232 232 ->setViewer($this->getViewer()) 233 - ->withCallsigns($callsigns) 234 - ->execute(); 235 - $repos = mpull($repos, null, 'getCallsign'); 233 + ->withIdentifiers($identifiers); 234 + 235 + $repos = $query->execute(); 236 236 237 - foreach ($callsigns as $sign) { 238 - if (empty($repos[$sign])) { 237 + $map = $query->getIdentifierMap(); 238 + foreach ($identifiers as $identifier) { 239 + if (empty($map[$identifier])) { 239 240 throw new PhutilArgumentUsageException( 240 - pht('No such repository with callsign "%s"!', $sign)); 241 + pht('No repository "%s" exists!', $identifier)); 241 242 } 242 243 } 243 244
+1 -4
src/applications/diffusion/herald/HeraldCommitAdapter.php
··· 130 130 } 131 131 132 132 public function getHeraldName() { 133 - return 134 - 'r'. 135 - $this->repository->getCallsign(). 136 - $this->commit->getCommitIdentifier(); 133 + return $this->commit->getMonogram(); 137 134 } 138 135 139 136 public function loadAffectedPaths() {
+1 -1
src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php
··· 112 112 } else if ($object instanceof DifferentialDiff) { 113 113 $diff_names[] = $object->getID(); 114 114 } else if ($object instanceof PhabricatorRepository) { 115 - $repository_names[] = 'r'.$object->getCallsign(); 115 + $repository_names[] = $object->getMonogram(); 116 116 } else if ($object instanceof PhabricatorRepositoryCommit) { 117 117 $repository = $object->getRepository(); 118 118 $commit_names[] = $repository->formatCommitName(
+1 -1
src/applications/owners/controller/PhabricatorOwnersPathsController.php
··· 83 83 } 84 84 } 85 85 86 - $repos = mpull($repos, 'getCallsign', 'getPHID'); 86 + $repos = mpull($repos, 'getMonogram', 'getPHID'); 87 87 asort($repos); 88 88 89 89 $template = new AphrontTypeaheadTemplateView();
+3 -3
src/applications/releeph/controller/product/ReleephProductCreateController.php
··· 121 121 122 122 foreach ($repos as $repo_id => $repo) { 123 123 $repo_name = $repo->getName(); 124 - $callsign = $repo->getCallsign(); 125 - $choices[$repo->getPHID()] = "r{$callsign} ({$repo_name})"; 124 + $display = $repo->getDisplayName(); 125 + $choices[$repo->getPHID()] = "{$display} ({$repo_name})"; 126 126 } 127 127 128 - ksort($choices); 128 + asort($choices); 129 129 return $choices; 130 130 } 131 131
+1 -1
src/applications/releeph/differential/DifferentialReleephRequestFieldSpecification.php
··· 372 372 'part of a Releeph branch, but also has %d path change(s) not '. 373 373 'part of a Releeph branch!', 374 374 $commit->getCommitIdentifier(), 375 - $repo->getCallsign(), 375 + $repo->getDisplayName(), 376 376 count($in_branch), 377 377 count($ex_branch)); 378 378 phlog($error);
+2 -2
src/applications/releeph/query/ReleephProductSearchEngine.php
··· 114 114 phutil_tag( 115 115 'a', 116 116 array( 117 - 'href' => '/diffusion/'.$repo->getCallsign().'/', 117 + 'href' => $repo->getURI(), 118 118 ), 119 - 'r'.$repo->getCallsign())); 119 + $repo->getMonogram())); 120 120 121 121 $list->addItem($item); 122 122 }