mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01: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:
parent
800be357e8
commit
3452315c7c
1 changed files with 8 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue