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
}
// 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(