diff tests/test-stack-branch.t @ 2684:90e11985d0cc

topic: exclude public and topic changeset from branch stack Stack use-case is to show the current work in progress, which are symbolized by the phase draft and secret phase. Moreover showing public changesets in stack output when displaying current branch would display a lot of changesets for long-lived branches and would be quite useless. We also exclude topic changeset form the stack since they already exist on their own stack. getstack revsets didn't needed update when displaying a topic as when a changeset become public, its topic is no longer relevant.
author Boris Feld <boris.feld@octobus.net>
date Thu, 29 Jun 2017 16:49:33 +0200
parents a6e3c2fcb1d7
children 9b68a2083dac
line wrap: on
line diff
--- a/tests/test-stack-branch.t	Thu Jun 29 16:29:08 2017 +0200
+++ b/tests/test-stack-branch.t	Thu Jun 29 16:49:33 2017 +0200
@@ -251,3 +251,39 @@
   b1: c_c
     ^ c_b
 
+Check that stack doesn't show draft changesets on a branch
+----------------------------------------------------------
+
+  $ hg stack
+  ### branch: foo (2 heads)
+  b6$ c_f (unstable)
+  b5$ c_e (unstable)
+  b2^ c_D (base)
+  b4: c_h
+  b3: c_g
+  b2@ c_D (current)
+  b1: c_c
+    ^ c_b
+  $ hg phase --public b1
+  $ hg stack
+  ### branch: foo (2 heads)
+  b5$ c_f (unstable)
+  b4$ c_e (unstable)
+  b1^ c_D (base)
+  b3: c_h
+  b2: c_g
+  b1@ c_D (current)
+    ^ c_c
+
+Check that stack doesn't show changeset with a topic
+----------------------------------------------------
+
+  $ hg topic --rev b4::b5 sometopic
+  changed topic on 2 changes
+  please run hg evolve --rev "topic(sometopic)" now
+  $ hg stack
+  ### branch: foo
+  b3: c_h
+  b2: c_g
+  b1@ c_D (current)
+    ^ c_c