From 4af7c865aa331d05d578c4b44ebca591793178d4 Mon Sep 17 00:00:00 2001 From: durham Date: Fri, 1 Mar 2013 14:10:25 -0800 Subject: [PATCH] Use hg phases to detect outgoing when phases are supported Summary: There was an accidental ! in the phase vs outgoing condition which caused it to use 'hg outgoing' when it should have used the draft() phase. Fixing this shaves 4.5 seconds off 'arc diff' on large repos. Test Plan: Ran arc diff --trace. Noted that the draft() was used and that the diff contained the correct files and commit. Reviewers: epriestley Reviewed By: epriestley CC: sid0, bos, dschleimer, aran, Korvin Differential Revision: https://secure.phabricator.com/D5182 --- 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 359d61b2..78f1cf5a 100644 --- a/src/repository/api/ArcanistMercurialAPI.php +++ b/src/repository/api/ArcanistMercurialAPI.php @@ -115,7 +115,7 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI { // Mercurial 2.1 and up have phases which indicate if something is // published or not. To find which revs are outgoing, it's much // faster to check the phase instead of actually checking the server. - if (!$this->supportsPhases()) { + if ($this->supportsPhases()) { list($err, $stdout) = $this->execManualLocal( 'log --branch %s -r %s --style default', $this->getBranchName(),