@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.

Fix resolution of commits in SVN repositories without callsigns

Summary:
Fixes T10721. When trying to load commits by identifier, we would take some bad pathways in Subversion if the repository had no callsign and end up missing the commits.

Fix this logic so it works for either callsigns (e.g., if passed `rXyyy`) or with PHIDs if passed repositories.

Test Plan:
- Viewed SVN commit in a Subversion repository with no callsign.
- Added a callsign, looked at it again.
- Viewed non-SVN commits in callsign and non-callsign repositories.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10721

Differential Revision: https://secure.phabricator.com/D15607

+5 -6
+5 -6
src/applications/diffusion/query/DiffusionCommitQuery.php
··· 364 364 365 365 if ($repo === null) { 366 366 if ($this->defaultRepository) { 367 - $repo = $this->defaultRepository->getCallsign(); 367 + $repo = $this->defaultRepository->getPHID(); 368 368 } 369 369 } 370 370 ··· 375 375 $bare[] = $commit_identifier; 376 376 } else { 377 377 $refs[] = array( 378 - 'callsign' => $repo, 378 + 'repository' => $repo, 379 379 'identifier' => $commit_identifier, 380 380 ); 381 381 } ··· 392 392 } 393 393 394 394 if ($refs) { 395 - $callsigns = ipull($refs, 'callsign'); 395 + $repositories = ipull($refs, 'repository'); 396 396 397 397 $repos = id(new PhabricatorRepositoryQuery()) 398 398 ->setViewer($this->getViewer()) 399 - ->withIdentifiers($callsigns); 399 + ->withIdentifiers($repositories); 400 400 $repos->execute(); 401 401 402 402 $repos = $repos->getIdentifierMap(); 403 403 foreach ($refs as $key => $ref) { 404 - $repo = idx($repos, $ref['callsign']); 405 - 404 + $repo = idx($repos, $ref['repository']); 406 405 if (!$repo) { 407 406 continue; 408 407 }