mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
Split the difference on remote URIs.
This is slightly trickier than D8082. Auditors: btrahan
This commit is contained in:
parent
f2bc293a2a
commit
e293d39b5f
1 changed files with 9 additions and 3 deletions
|
@ -486,21 +486,27 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
}
|
||||
|
||||
public function getNormalizedPath() {
|
||||
if ($this->isHosted()) {
|
||||
$uri = PhabricatorEnv::getProductionURI($this->getURI());
|
||||
} else {
|
||||
$uri = $this->getRemoteURI();
|
||||
}
|
||||
|
||||
switch ($this->getVersionControlSystem()) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$normalized_uri = new PhabricatorRepositoryURINormalizer(
|
||||
PhabricatorRepositoryURINormalizer::TYPE_GIT,
|
||||
$this->getRemoteURI());
|
||||
$uri);
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$normalized_uri = new PhabricatorRepositoryURINormalizer(
|
||||
PhabricatorRepositoryURINormalizer::TYPE_SVN,
|
||||
$this->getRemoteURI());
|
||||
$uri);
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
$normalized_uri = new PhabricatorRepositoryURINormalizer(
|
||||
PhabricatorRepositoryURINormalizer::TYPE_MERCURIAL,
|
||||
$this->getRemoteURI());
|
||||
$uri);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Unrecognized version control system.");
|
||||
|
|
Loading…
Reference in a new issue