From 3201239e85ea0fe5c13b3a2142d88bdb4a6ed185 Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Tue, 17 Jun 2014 04:51:55 -0700 Subject: [PATCH] Correctly recognize "no bookmarks" for Mercurial Summary: Fixes T5086. Test Plan: remove all bookmarks and run `arc feature` Reviewers: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5086 Differential Revision: https://secure.phabricator.com/D9588 --- src/repository/api/ArcanistMercurialAPI.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php index db23b94d..7efb257d 100644 --- a/src/repository/api/ArcanistMercurialAPI.php +++ b/src/repository/api/ArcanistMercurialAPI.php @@ -555,6 +555,10 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI { public function getAllBranches() { list($branch_info) = $this->execxLocal('bookmarks'); + if (trim($branch_info) == 'no bookmarks set') { + return array(); + } + $matches = null; preg_match_all( '/^\s*(\*?)\s*(.+)\s(\S+)$/m',