1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Pass branch to Diffusion URI in Owners and Externals

Test Plan: Visited detail of package in SVN and Git.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3514
This commit is contained in:
vrana 2012-09-17 16:49:55 -07:00
parent 8481f7ef09
commit 5b6513e6e8
3 changed files with 9 additions and 4 deletions

View file

@ -60,6 +60,7 @@ final class DiffusionExternalController extends DiffusionController {
array( array(
'action' => 'browse', 'action' => 'browse',
'callsign' => $repository->getCallsign(), 'callsign' => $repository->getCallsign(),
'branch' => $repository->getDefaultBranch(),
'commit' => $id, 'commit' => $id,
)); ));
return id(new AphrontRedirectResponse())->setURI($redirect); return id(new AphrontRedirectResponse())->setURI($redirect);
@ -88,11 +89,12 @@ final class DiffusionExternalController extends DiffusionController {
"Diffusion does not know about.</p>"); "Diffusion does not know about.</p>");
} else if (count($commits) == 1) { } else if (count($commits) == 1) {
$commit = head($commits); $commit = head($commits);
$repo = $repositories[$commit->getRepositoryID()];
$redirect = DiffusionRequest::generateDiffusionURI( $redirect = DiffusionRequest::generateDiffusionURI(
array( array(
'action' => 'browse', 'action' => 'browse',
'callsign' => $repositories[$commit->getRepositoryID()] 'callsign' => $repo->getCallsign(),
->getCallsign(), 'branch' => $repo->getDefaultBranch(),
'commit' => $commit->getCommitIdentifier(), 'commit' => $commit->getCommitIdentifier(),
)); ));
return id(new AphrontRedirectResponse())->setURI($redirect); return id(new AphrontRedirectResponse())->setURI($redirect);
@ -105,6 +107,7 @@ final class DiffusionExternalController extends DiffusionController {
array( array(
'action' => 'browse', 'action' => 'browse',
'callsign' => $repo->getCallsign(), 'callsign' => $repo->getCallsign(),
'branch' => $repo->getDefaultBranch(),
'commit' => $commit->getCommitIdentifier(), 'commit' => $commit->getCommitIdentifier(),
)); ));
$rows[] = array( $rows[] = array(

View file

@ -101,6 +101,7 @@ final class PhabricatorOwnersDetailController
$href = DiffusionRequest::generateDiffusionURI( $href = DiffusionRequest::generateDiffusionURI(
array( array(
'callsign' => $repo->getCallsign(), 'callsign' => $repo->getCallsign(),
'branch' => $repo->getDefaultBranch(),
'path' => $path->getPath(), 'path' => $path->getPath(),
'action' => 'browse' 'action' => 'browse'
)); ));

View file

@ -265,6 +265,7 @@ final class PhabricatorOwnersListController
$href = DiffusionRequest::generateDiffusionURI( $href = DiffusionRequest::generateDiffusionURI(
array( array(
'callsign' => $repo->getCallsign(), 'callsign' => $repo->getCallsign(),
'branch' => $repo->getDefaultBranch(),
'path' => $path->getPath(), 'path' => $path->getPath(),
'action' => 'browse', 'action' => 'browse',
)); ));