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,14 +83,13 @@ abstract class ArcanistRepositoryAPI {
|
|||
}
|
||||
|
||||
// check if we're in an svn working copy
|
||||
list($err) = id(new ExecFuture('svn info'))
|
||||
->setCWD($root)
|
||||
->resolve();
|
||||
if (!$err) {
|
||||
foreach (Filesystem::walkToRoot($root) as $dir) {
|
||||
if (Filesystem::pathExists($dir . '/.svn')) {
|
||||
$api = new ArcanistSubversionAPI($root);
|
||||
$api->workingCopyIdentity = $working_copy;
|
||||
return $api;
|
||||
}
|
||||
}
|
||||
|
||||
throw new ArcanistUsageException(
|
||||
"The current working directory is not part of a working copy for a ".
|
||||
|
|
Loading…
Reference in a new issue