1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 00:49:11 +02: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:
vrana 2012-12-20 18:04:59 -08:00
parent 3f05751724
commit 940d91d7b5

View file

@ -83,13 +83,12 @@ abstract class ArcanistRepositoryAPI {
}
// check if we're in an svn working copy
list($err) = id(new ExecFuture('svn info'))
->setCWD($root)
->resolve();
if (!$err) {
$api = new ArcanistSubversionAPI($root);
$api->workingCopyIdentity = $working_copy;
return $api;
foreach (Filesystem::walkToRoot($root) as $dir) {
if (Filesystem::pathExists($dir . '/.svn')) {
$api = new ArcanistSubversionAPI($root);
$api->workingCopyIdentity = $working_copy;
return $api;
}
}
throw new ArcanistUsageException(