1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Save absolute path when linting git-svn repo

Test Plan: Dumped `$this->svnRoot` in git-svn repo.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4255
This commit is contained in:
vrana 2012-12-20 17:26:31 -08:00
parent 800be357e8
commit 3452315c7c

View file

@ -38,7 +38,15 @@ final class DiffusionLintSaveRunner {
public function run($dir) {
$working_copy = ArcanistWorkingCopyIdentity::newFromPath($dir);
$api = ArcanistRepositoryAPI::newAPIFromWorkingCopyIdentity($working_copy);
$this->svnRoot = id(new PhutilURI($api->getSourceControlPath()))->getPath();
if ($api instanceof ArcanistGitAPI) {
$svn_fetch = $api->getGitConfig('svn-remote.svn.fetch');
list($this->svnRoot) = explode(':', $svn_fetch);
if ($this->svnRoot != '') {
$this->svnRoot = '/' . $this->svnRoot;
}
}
$project_id = $working_copy->getProjectID();
$project = id(new PhabricatorRepositoryArcanistProject())