mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Speed up SVN discovery
Summary: `svn info` takes up to 10 seconds. Test Plan: `arc diff` inside SVN repo and outside any repo. Reviewers: nh, epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4256
This commit is contained in:
parent
3f05751724
commit
940d91d7b5
1 changed files with 6 additions and 7 deletions
|
@ -83,13 +83,12 @@ abstract class ArcanistRepositoryAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if we're in an svn working copy
|
// check if we're in an svn working copy
|
||||||
list($err) = id(new ExecFuture('svn info'))
|
foreach (Filesystem::walkToRoot($root) as $dir) {
|
||||||
->setCWD($root)
|
if (Filesystem::pathExists($dir . '/.svn')) {
|
||||||
->resolve();
|
$api = new ArcanistSubversionAPI($root);
|
||||||
if (!$err) {
|
$api->workingCopyIdentity = $working_copy;
|
||||||
$api = new ArcanistSubversionAPI($root);
|
return $api;
|
||||||
$api->workingCopyIdentity = $working_copy;
|
}
|
||||||
return $api;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new ArcanistUsageException(
|
throw new ArcanistUsageException(
|
||||||
|
|
Loading…
Reference in a new issue