Differential D7683 Diff 17352 src/applications/diffusion/controller/DiffusionRepositoryController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionRepositoryController.php
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | private function buildPropertiesTable(PhabricatorRepository $repository) { | ||||
if ($repository->isHosted()) { | if ($repository->isHosted()) { | ||||
$serve_off = PhabricatorRepository::SERVE_OFF; | $serve_off = PhabricatorRepository::SERVE_OFF; | ||||
$callsign = $repository->getCallsign(); | $callsign = $repository->getCallsign(); | ||||
$repo_path = '/diffusion/'.$callsign.'/'; | $repo_path = '/diffusion/'.$callsign.'/'; | ||||
$serve_ssh = $repository->getServeOverSSH(); | $serve_ssh = $repository->getServeOverSSH(); | ||||
if ($serve_ssh !== $serve_off) { | if ($serve_ssh !== $serve_off) { | ||||
$uri = new PhutilURI(PhabricatorEnv::getProductionURI($repo_path)); | $uri = new PhutilURI(PhabricatorEnv::getProductionURI($repo_path)); | ||||
if ($repository->isSVN()) { | |||||
$uri->setProtocol('svn+ssh'); | |||||
} else { | |||||
$uri->setProtocol('ssh'); | $uri->setProtocol('ssh'); | ||||
} | |||||
$ssh_user = PhabricatorEnv::getEnvConfig('diffusion.ssh-user'); | $ssh_user = PhabricatorEnv::getEnvConfig('diffusion.ssh-user'); | ||||
if ($ssh_user) { | if ($ssh_user) { | ||||
$uri->setUser($ssh_user); | $uri->setUser($ssh_user); | ||||
} | } | ||||
// This isn't quite right, but for now it's probably better to drop | // This isn't quite right, but for now it's probably better to drop | ||||
// the port than sometimes show ":8080", etc. Using most VCS commands | // the port than sometimes show ":8080", etc. Using most VCS commands | ||||
▲ Show 20 Lines • Show All 370 Lines • Show Last 20 Lines |