]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Correctly recognize "no bookmarks" for Mercurial
authorRichard van Velzen <rvanvelzen1@gmail.com>
Tue, 17 Jun 2014 11:51:55 +0000 (04:51 -0700)
committerepriestley <git@epriestley.com>
Tue, 17 Jun 2014 11:51:55 +0000 (04:51 -0700)
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

index db23b94d64dbfbbad7e748fab64bacd359415959..7efb257d36f3b536cb2a0d7d712e41c9fe1d5a2d 100644 (file)
@@ -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',