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,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(