1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-04 11:51:02 +01:00

Use remote URI, not display URI, to match repositories

Summary:
I derped this up, and it passed my tests because the two URIs are the same for hosted repositories.

Match repositories against their remote URI (like `https://github.com/user/repo.git`), not their display URI (like `/diffusion/X/`).

Test Plan: i r dums

Reviewers: talshiri, btrahan

Reviewed By: talshiri

CC: aran

Differential Revision: https://secure.phabricator.com/D8082
This commit is contained in:
epriestley 2014-01-27 18:49:35 -08:00
parent 7f0ca5971c
commit f2bc293a2a

View file

@ -490,17 +490,17 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
$normalized_uri = new PhabricatorRepositoryURINormalizer( $normalized_uri = new PhabricatorRepositoryURINormalizer(
PhabricatorRepositoryURINormalizer::TYPE_GIT, PhabricatorRepositoryURINormalizer::TYPE_GIT,
$this->getURI()); $this->getRemoteURI());
break; break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
$normalized_uri = new PhabricatorRepositoryURINormalizer( $normalized_uri = new PhabricatorRepositoryURINormalizer(
PhabricatorRepositoryURINormalizer::TYPE_SVN, PhabricatorRepositoryURINormalizer::TYPE_SVN,
$this->getURI()); $this->getRemoteURI());
break; break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
$normalized_uri = new PhabricatorRepositoryURINormalizer( $normalized_uri = new PhabricatorRepositoryURINormalizer(
PhabricatorRepositoryURINormalizer::TYPE_MERCURIAL, PhabricatorRepositoryURINormalizer::TYPE_MERCURIAL,
$this->getURI()); $this->getRemoteURI());
break; break;
default: default:
throw new Exception("Unrecognized version control system."); throw new Exception("Unrecognized version control system.");