Summary: Ref T7123. Turns out that we might throw ConduitClientException now in proxied scenarios. For all but one callsite remove the try / catch bit and don't issue the call for SVN. For the remaining callsite, also don't issue the call for SVN but keep in the exception logic since its renders a pretty error message in the non-proxied case? Test Plan: played around with diffusion and things looked okay. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7123 Differential Revision: https://secure.phabricator.com/D11789
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
final class DiffusionCommitBranchesController extends DiffusionController {
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
protected function processDiffusionRequest(AphrontRequest $request) {
|
|
$drequest = $this->getDiffusionRequest();
|
|
$repository = $drequest->getRepository();
|
|
|
|
switch ($repository->getVersionControlSystem()) {
|
|
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
|
$branches = array();
|
|
break;
|
|
default:
|
|
$branches = $this->callConduitWithDiffusionRequest(
|
|
'diffusion.branchquery',
|
|
array(
|
|
'contains' => $drequest->getCommit(),
|
|
));
|
|
break;
|
|
}
|
|
|
|
$branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches);
|
|
$branch_links = array();
|
|
foreach ($branches as $branch) {
|
|
$branch_links[] = phutil_tag(
|
|
'a',
|
|
array(
|
|
'href' => $drequest->generateURI(
|
|
array(
|
|
'action' => 'browse',
|
|
'branch' => $branch->getShortName(),
|
|
)),
|
|
),
|
|
$branch->getShortName());
|
|
}
|
|
|
|
return id(new AphrontAjaxResponse())
|
|
->setContent($branch_links ? implode(', ', $branch_links) : 'None');
|
|
}
|
|
}
|