mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Prefer Mercurial and Git over Subversion in discovering repository
Summary: `svn info` is the slowest command for discovering repository (up to 300 ms) and Subversion is probably the least used repository type with Arcanist. Let's discover it last. Test Plan: $ arc lint --trace Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4039
This commit is contained in:
parent
db25adb069
commit
c12dee997d
1 changed files with 8 additions and 8 deletions
|
@ -56,14 +56,6 @@ abstract class ArcanistRepositoryAPI {
|
|||
"any parent directory. Create an '.arcconfig' file to configure arc.");
|
||||
}
|
||||
|
||||
// check if we're in an svn working copy
|
||||
list($err) = exec_manual('svn info');
|
||||
if (!$err) {
|
||||
$api = new ArcanistSubversionAPI($root);
|
||||
$api->workingCopyIdentity = $working_copy;
|
||||
return $api;
|
||||
}
|
||||
|
||||
if (Filesystem::pathExists($root.'/.hg')) {
|
||||
$api = new ArcanistMercurialAPI($root);
|
||||
$api->workingCopyIdentity = $working_copy;
|
||||
|
@ -83,6 +75,14 @@ abstract class ArcanistRepositoryAPI {
|
|||
return $api;
|
||||
}
|
||||
|
||||
// check if we're in an svn working copy
|
||||
list($err) = exec_manual('svn info');
|
||||
if (!$err) {
|
||||
$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 ".
|
||||
"supported version control system (svn, git or mercurial).");
|
||||
|
|
Loading…
Reference in a new issue