Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 940d91d7b587f6ced7ea2173c2c60089f11aeddd 1 parent 3f05751
vrana authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/repository/api/ArcanistRepositoryAPI.php
View
13 src/repository/api/ArcanistRepositoryAPI.php
@@ -83,13 +83,12 @@ public static function newAPIFromWorkingCopyIdentity(
}
// 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(

0 comments on commit 940d91d

Please sign in to comment.
Something went wrong with that request. Please try again.