From: Richard van Velzen Date: Tue, 17 Jun 2014 11:51:55 +0000 (-0700) Subject: Correctly recognize "no bookmarks" for Mercurial X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3201239e85ea0fe5c13b3a2142d88bdb4a6ed185;p=arcanist.git 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 --- 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',