1
0
Fork 0
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:
vrana 2012-12-20 18:04:59 -08:00
parent 3f05751724
commit 940d91d7b5

View file

@ -83,14 +83,13 @@ 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();
if (!$err) {
$api = new ArcanistSubversionAPI($root); $api = new ArcanistSubversionAPI($root);
$api->workingCopyIdentity = $working_copy; $api->workingCopyIdentity = $working_copy;
return $api; return $api;
} }
}
throw new ArcanistUsageException( throw new ArcanistUsageException(
"The current working directory is not part of a working copy for a ". "The current working directory is not part of a working copy for a ".