Patchwork D9513: phab-refresh: do not error out when the stack is empty

login
register
mail settings
Submitter phabricator
Date Dec. 3, 2020, 7:11 a.m.
Message ID <differential-rev-PHID-DREV-3etfq47rl4lwr626wcep-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47795/
State Superseded
Headers show

Comments

phabricator - Dec. 3, 2020, 7:11 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Actually, empty stack is easier to get than I expected (and harmless). When a
  stack is publish, heptapod will detect the even, empty the stack (triggering CI)
  and "forgetting" the branch afterward.
  
  So we stop returning as error in this case.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9513

AFFECTED FILES
  contrib/phab-refresh-stack.sh

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/contrib/phab-refresh-stack.sh b/contrib/phab-refresh-stack.sh
--- a/contrib/phab-refresh-stack.sh
+++ b/contrib/phab-refresh-stack.sh
@@ -6,7 +6,7 @@ 
 
 if [[ $revision_in_stack -eq 0 ]]; then
     echo "stack is empty" >&2
-    exit 1
+    exit 0
 fi
 
 if [[ $revision_on_phab -eq 0 ]]; then