1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00

Specify an ssh port for Diffusion when running against the grain

Summary: We run `git` on a different port than 22, so would like to reflect this change in the UI.

Test Plan: Set diffusion.ssh-port in settings, then make sure it's reflected on the Diffusion repository Clone URI.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran, dctrwatson

Differential Revision: https://secure.phabricator.com/D7755
This commit is contained in:
Matt Robenolt 2013-12-11 12:11:13 -08:00 committed by epriestley
parent 052c83a613
commit c3d9c28382
2 changed files with 8 additions and 5 deletions

View file

@ -109,6 +109,13 @@ final class PhabricatorDiffusionConfigOptions
'When constructing clone URIs to show to users, Diffusion will '.
'fill in this login username. If you have configured a VCS user '.
'like `git`, you should provide it here.')),
$this->newOption('diffusion.ssh-port', 'int', null)
->setSummary(pht('Port for SSH connections to repositories.'))
->setDescription(
pht(
'When constructing clone URIs to show to users, Diffusion by '.
'default will not display a port assuming the default for your '.
'VCS. Explicitly declare when running on a non-standard port.')),
);
}

View file

@ -185,11 +185,7 @@ final class DiffusionRepositoryController extends DiffusionController {
$uri->setUser($ssh_user);
}
// 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
// against nonstandard ports is a huge pain so few installs are likely
// to configure SSH on a nonstandard port.
$uri->setPort(null);
$uri->setPort(PhabricatorEnv::getEnvConfig('diffusion.ssh-port'));
$clone_uri = $this->renderCloneURI(
$uri,