From: durham Date: Fri, 23 Aug 2013 23:40:15 +0000 (-0700) Subject: Better heuristic for checking for hgsubversion X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=57bc582ad273c238938ac53a7c0d4eb1fdeb013d;p=arcanist.git 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 --- 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() {