Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 3452315c7c01e2da70649dbeaf6f8c0acf2244b5 1 parent 800be35
vrana authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/applications/diffusion/DiffusionLintSaveRunner.php
View
8 src/applications/diffusion/DiffusionLintSaveRunner.php
@@ -38,7 +38,15 @@ public function setChunkSize($number) {
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())
Please sign in to comment.
Something went wrong with that request. Please try again.