From 57bc582ad273c238938ac53a7c0d4eb1fdeb013d Mon Sep 17 00:00:00 2001 From: durham Date: Fri, 23 Aug 2013 16:40:15 -0700 Subject: [PATCH] Better heuristic for checking for hgsubversion Summary: The existing heuristic checks for the existence of .hg/svn, but it turns out that this directory can exist in a non-svn hg repo if the user or a script ever runs a 'hg svn' command. Now we check for a file inside .hg/svn. The hgsubversion maintainer said this particular file will always be present in hgsubversion repos. Test Plan: arc land --trace Verified it used 'hg push' and not 'hg push -r ...'. This indicates it considered the repo to be an hgsubversion repo. Reviewers: epriestley Reviewed By: epriestley CC: dschleimer, sid0, Korvin, aran Differential Revision: https://secure.phabricator.com/D6807 --- src/repository/api/ArcanistMercurialAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php index 0029c318..2d7484a8 100644 --- a/src/repository/api/ArcanistMercurialAPI.php +++ b/src/repository/api/ArcanistMercurialAPI.php @@ -917,7 +917,7 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI { } public function isHgSubversionRepo() { - return file_exists($this->getPath('.hg/svn')); + return file_exists($this->getPath('.hg/svn/rev_map')); } public function getSubversionInfo() {