topic: try to clarify the "branch" part in stack
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 24 Sep 2017 11:30:14 +0200
changeset 2997 a61634f52742
parent 2996 7cc79fc0e637
child 2998 6b08a7836788
topic: try to clarify the "branch" part in stack The idea is to clarify the meaning of "behind" with using the "target" word.
hgext3rd/topic/stack.py
tests/test-evolve-topic.t
tests/test-stack-branch.t
tests/test-topic-fold.t
tests/test-topic-rebase.t
tests/test-topic-shelve.t
tests/test-topic-stack-data.t
tests/test-topic-stack.t
tests/test-topic-tutorial.t
tests/test-topic.t
--- a/hgext3rd/topic/stack.py	Tue Sep 26 13:01:21 2017 +0200
+++ b/hgext3rd/topic/stack.py	Sun Sep 24 11:30:14 2017 +0200
@@ -227,7 +227,7 @@
                      label='topic.stack.summary.headcount.multiple')
             fm.plain(')')
         fm.plain('\n')
-    fm.plain(_('### branch: %s')
+    fm.plain(_('### target: %s (branch)')
              % '+'.join(data['branches']), # XXX handle multi branches
              label='topic.stack.summary.branches')
     if topic is None:
--- a/tests/test-evolve-topic.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-evolve-topic.t	Sun Sep 24 11:30:14 2017 +0200
@@ -77,6 +77,7 @@
   $ hg topic -l 
   ### topic: foo (?)
   ### branch: default (?)
+  ### target: default (branch)
   t4@ add fff (current)
   t3: add eee
   t2: add ddd
--- a/tests/test-stack-branch.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-stack-branch.t	Sun Sep 24 11:30:14 2017 +0200
@@ -55,7 +55,7 @@
   $ hg up other
   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
   $ hg stack
-  ### branch: other
+  ### target: other (branch)
   b2@ c_b (current)
   b1: c_a
   $ hg phase --public 'branch("other")'
@@ -70,14 +70,14 @@
   $ hg branch
   foo
   $ hg stack
-  ### branch: foo
+  ### target: foo (branch)
   b4@ c_f (current)
   b3: c_e
   b2: c_d
   b1: c_c
   b0^ c_b (base)
   $ hg stack -v
-  ### branch: foo
+  ### target: foo (branch)
   b4(913c298d8b0a)@ c_f (current)
   b3(4f2a69f6d380): c_e
   b2(f61adbacd17a): c_d
@@ -125,7 +125,7 @@
   o  0 other {} public c_a
   
   $ hg stack
-  ### branch: foo
+  ### target: foo (branch)
   b4$ c_f (unstable)
   b3$ c_e (unstable)
   b2@ c_d (current)
@@ -134,7 +134,7 @@
   $ hg up b3
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg stack
-  ### branch: foo
+  ### target: foo (branch)
   b4$ c_f (unstable)
   b3$ c_e (current unstable)
   b2: c_d
@@ -205,7 +205,7 @@
 Test output
 
   $ hg stack
-  ### branch: foo (2 heads)
+  ### target: foo (branch) (2 heads)
   b6@ c_h (current)
   b5: c_g
   b2^ c_d (base)
@@ -248,7 +248,7 @@
   
 
   $ hg stack
-  ### branch: foo (2 heads)
+  ### target: foo (branch) (2 heads)
   b6: c_h
   b5: c_g
   b2^ c_D (base)
@@ -282,7 +282,7 @@
   
 
   $ hg stack
-  ### branch: foo (2 heads)
+  ### target: foo (branch) (2 heads)
   b6: c_h
   b5: c_g
   b2^ c_D (base)
@@ -293,7 +293,7 @@
   b0^ c_b (base)
   $ hg phase --public b1
   $ hg stack
-  ### branch: foo (2 heads)
+  ### target: foo (branch) (2 heads)
   b5: c_h
   b4: c_g
   b1^ c_D (base)
@@ -308,7 +308,7 @@
   $ hg topic --rev b4::b5 sometopic
   changed topic on 2 changes
   $ hg stack
-  ### branch: foo
+  ### target: foo (branch)
   b3$ c_f (unstable)
   b2$ c_e (unstable)
   b1@ c_D (current)
--- a/tests/test-topic-fold.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-topic-fold.t	Sun Sep 24 11:30:14 2017 +0200
@@ -53,7 +53,7 @@
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg stack
   ### topic: myfeature
-  ### branch: default
+  ### target: default (branch)
   t1@ folded (current)
   t0^ add ROOT (base)
   $ logtopic
--- a/tests/test-topic-rebase.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-topic-rebase.t	Sun Sep 24 11:30:14 2017 +0200
@@ -45,7 +45,7 @@
   active topic 'myfeature' grew its first changeset
   $ hg stack
   ### topic: myfeature
-  ### branch: default
+  ### target: default (branch)
   t1@ add feature1 (current)
   t0^ add ROOT (base)
   $ logtopic
@@ -75,7 +75,7 @@
   switching to topic myfeature
   $ hg stack
   ### topic: myfeature
-  ### branch: default
+  ### target: default (branch)
   t1@ add feature1 (current)
   t0^ add default (base)
   $ logtopic
@@ -89,7 +89,7 @@
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg stack
   ### topic: myfeature
-  ### branch: default
+  ### target: default (branch)
   t1@ add feature1 (current)
   t0^ add default (base)
 
@@ -153,13 +153,13 @@
      topics:
   $ hg stack
   ### topic: myotherfeature
-  ### branch: default
+  ### target: default (branch)
   t1@ myotherfeature1 (current)
   t0^ default3 (base)
   $ hg update --rev 7
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg stack
   ### topic: myotherfeature
-  ### branch: default
+  ### target: default (branch)
   t1@ myotherfeature1 (current)
   t0^ default3 (base)
--- a/tests/test-topic-shelve.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-topic-shelve.t	Sun Sep 24 11:30:14 2017 +0200
@@ -24,7 +24,7 @@
   $ echo " World" >> a
   $ hg stack
   ### topic: testing-shelve
-  ### branch: default
+  ### target: default (branch)
   t1@ First commit (current)
 
 shelve test
@@ -37,7 +37,7 @@
    * testing-shelve
   $ hg stack
   ### topic: testing-shelve
-  ### branch: default
+  ### target: default (branch)
   t1@ First commit (current)
 
 unshelve test
@@ -48,5 +48,5 @@
    * testing-shelve
   $ hg stack
   ### topic: testing-shelve
-  ### branch: default
+  ### target: default (branch)
   t1@ First commit (current)
--- a/tests/test-topic-stack-data.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-topic-stack-data.t	Sun Sep 24 11:30:14 2017 +0200
@@ -249,7 +249,7 @@
 
   $ hg stack bar
   ### topic: bar (2 heads)
-  ### branch: default
+  ### target: default (branch)
   t5: add bar_c
   t2^ add bar_b (base)
   t4$ add bar_e (unstable)
@@ -259,7 +259,7 @@
   t0^ add base_e (base)
   $ hg stack bar -v
   ### topic: bar (2 heads)
-  ### branch: default
+  ### target: default (branch)
   t5(9cbadf11b44d): add bar_c
   t2(e555c7e8c767)^ add bar_b (base)
   t4(a920412b5a05)$ add bar_e (unstable)
@@ -269,19 +269,19 @@
   t0(92f489a6251f)^ add base_e (base)
   $ hg stack baz
   ### topic: baz
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t2: add baz_b
   t1: add baz_a
   t0^ add base_c (base)
   $ hg stack foo
   ### topic: foo
-  ### branch: lake, ambigious rebase destination - branch 'lake' has 2 heads
+  ### target: lake (branch), ambigious rebase destination - branch 'lake' has 2 heads
   t2@ add foo_b (current)
   t1: add foo_a
   t0^ add lake_a (base)
   $ hg stack fuz
   ### topic: fuz
-  ### branch: default, 1 behind
+  ### target: default (branch), 1 behind
   t3$ add fuz_c (unstable)
   t2$ add fuz_b (unstable)
   t1: fuz1_a
--- a/tests/test-topic-stack.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-topic-stack.t	Sun Sep 24 11:30:14 2017 +0200
@@ -57,7 +57,7 @@
   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
   $ hg topic --list
   ### topic: other
-  ### branch: default
+  ### target: default (branch)
   t2@ c_b (current)
   t1: c_a
   $ hg phase --public 'topic("other")'
@@ -70,7 +70,7 @@
    * other
   $ hg stack
   ### topic: other
-  ### branch: default
+  ### target: default (branch)
   (stack is empty)
   t0^ c_b (base)
 
@@ -87,7 +87,7 @@
    * foo
   $ hg stack
   ### topic: foo
-  ### branch: default
+  ### target: default (branch)
   t4@ c_f (current)
   t3: c_e
   t2: c_d
@@ -95,7 +95,7 @@
   t0^ c_b (base)
   $ hg stack -v
   ### topic: foo
-  ### branch: default
+  ### target: default (branch)
   t4(6559e6d93aea)@ c_f (current)
   t3(0f9ac936c87d): c_e
   t2(e629654d7050): c_d
@@ -209,7 +209,7 @@
    * foo
   $ hg stack
   ### topic: foo
-  ### branch: default
+  ### target: default (branch)
   t4@ c_f (current)
   t3: c_e
   t2: c_d
@@ -219,7 +219,7 @@
    * foo
   $ hg stack --config ui.strict=true
   ### topic: foo
-  ### branch: default
+  ### target: default (branch)
   t4@ c_f (current)
   t3: c_e
   t2: c_d
@@ -230,7 +230,7 @@
 
   $ hg topic --clear
   $ hg stack
-  ### branch: default
+  ### target: default (branch)
   (stack is empty)
   b0^ c_f (base)
 
@@ -279,7 +279,7 @@
   
   $ hg topic --list
   ### topic: foo
-  ### branch: default
+  ### target: default (branch)
   t4$ c_f (unstable)
   t3$ c_e (unstable)
   t2@ c_d (current)
@@ -289,7 +289,7 @@
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg topic --list
   ### topic: foo
-  ### branch: default
+  ### target: default (branch)
   t4$ c_f (unstable)
   t3$ c_e (current unstable)
   t2: c_d
@@ -297,7 +297,7 @@
   t0^ c_b (base)
   $ hg topic --list --color=debug
   [topic.stack.summary.topic|### topic: [topic.active|foo]]
-  [topic.stack.summary.branches|### branch: default]
+  [topic.stack.summary.branches|### target: default (branch)]
   [topic.stack.index topic.stack.index.unstable|t4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)]
   [topic.stack.index topic.stack.index.current topic.stack.index.unstable|t3][topic.stack.state topic.stack.state.current topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.current topic.stack.desc.unstable|c_e][topic.stack.state topic.stack.state.current topic.stack.state.unstable| (current unstable)]
   [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d]
@@ -377,7 +377,7 @@
 
   $ hg top -l
   ### topic: foo (2 heads)
-  ### branch: default
+  ### target: default (branch)
   t6@ c_h (current)
   t5: c_g
   t2^ c_d (base)
@@ -421,7 +421,7 @@
 
   $ hg topic --list
   ### topic: foo (2 heads)
-  ### branch: default
+  ### target: default (branch)
   t6: c_h
   t5: c_g
   t2^ c_D (base)
@@ -545,7 +545,7 @@
 
   $ hg stack
   ### topic: foobar
-  ### branch: default, 3 behind
+  ### target: default (branch), 3 behind
   t2@ c_e (current)
     ^ c_h
   t1: c_D
@@ -553,7 +553,7 @@
 
   $ hg stack foo
   ### topic: foo
-  ### branch: default, ambigious rebase destination - topic 'foo' has 3 heads
+  ### target: default (branch), ambigious rebase destination - topic 'foo' has 3 heads
   t4: c_f
     ^ c_e
   t3: c_h
@@ -633,7 +633,7 @@
 
   $ hg stack red
   ### topic: red
-  ### branch: default, 6 behind
+  ### target: default (branch), 6 behind
   t5: c_H
     ^ c_G
     ^ c_D
@@ -645,7 +645,7 @@
   t0^ c_A (base)
   $ hg stack blue
   ### topic: blue
-  ### branch: default, ambigious rebase destination - topic 'blue' has 3 heads
+  ### target: default (branch), ambigious rebase destination - topic 'blue' has 3 heads
   t3@ c_I (current)
     ^ c_H
   t2: c_D
@@ -698,7 +698,7 @@
 
   $ hg stack red
   ### topic: red
-  ### branch: default, ambigious rebase destination - topic 'red' has 3 heads
+  ### target: default (branch), ambigious rebase destination - topic 'red' has 3 heads
   t5$ c_H (unstable)
     ^ c_G
     ^ c_D
@@ -710,7 +710,7 @@
   t0^ c_A (base)
   $ hg stack blue
   ### topic: blue
-  ### branch: default, ambigious rebase destination - topic 'blue' has 3 heads
+  ### target: default (branch), ambigious rebase destination - topic 'blue' has 3 heads
   t3$ c_I (unstable)
     ^ c_H
   t2$ c_G (unstable)
@@ -772,7 +772,7 @@
 
   $ hg stack red
   ### topic: red
-  ### branch: default, ambigious rebase destination - topic 'red' has 3 heads
+  ### target: default (branch), ambigious rebase destination - topic 'red' has 3 heads
   t5$ c_H (unstable)
     ^ c_G
     ^ c_D
@@ -784,7 +784,7 @@
   t0^ c_A (base)
   $ hg stack blue
   ### topic: blue
-  ### branch: default, ambigious rebase destination - topic 'blue' has 3 heads
+  ### target: default (branch), ambigious rebase destination - topic 'blue' has 3 heads
   t3$ c_I (unstable)
     ^ c_H
   t2$ c_G (unstable)
--- a/tests/test-topic-tutorial.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-topic-tutorial.t	Sun Sep 24 11:30:14 2017 +0200
@@ -248,7 +248,7 @@
 
   $ hg stack
   ### topic: food
-  ### branch: default
+  ### target: default (branch)
   t2@ adding fruits (current)
   t1: adding condiments
   t0^ Shopping list (base)
@@ -595,7 +595,7 @@
 
   $ hg topics --list
   ### topic: food
-  ### branch: default
+  ### target: default (branch)
   (stack is empty)
   t0^ adding fruits (base)
 
@@ -771,7 +771,7 @@
 
   $ hg stack
   ### topic: drinks
-  ### branch: default
+  ### target: default (branch)
   t2@ Adding orange juice (current)
   t1: Adding apple juice
   t0^ adding fruits (base)
@@ -782,7 +782,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default
+  ### target: default (branch)
   t3@ Adding drill (current)
   t2: Adding saw
   t1: Adding hammer
@@ -1100,7 +1100,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3@ Adding drill (current)
   t2: Adding saw
   t1: Adding hammer
@@ -1119,7 +1119,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3@ Adding drill (current)
   t2: Adding saw
   t1: Adding hammer
@@ -1135,7 +1135,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3: Adding drill
   t2@ Adding saw (current)
   t1: Adding hammer
@@ -1149,7 +1149,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3@ Adding drill (current)
   t2: Adding saw
   t1: Adding hammer
@@ -1162,7 +1162,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3: Adding drill
   t2: Adding saw
   t1@ Adding hammer (current)
@@ -1175,7 +1175,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3: Adding drill
   t2: Adding saw
   t1@ Adding hammer (current)
@@ -1336,7 +1336,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3$ Adding drill (unstable)
   t2$ Adding saw (unstable)
   t1@ Adding hammer to the shopping list (current)
@@ -1353,7 +1353,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3$ Adding drill (unstable)
   t2@ Adding saw (current)
   t1: Adding hammer to the shopping list
@@ -1368,7 +1368,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t3@ Adding drill (current)
   t2: Adding saw
   t1: Adding hammer to the shopping list
@@ -1511,7 +1511,7 @@
 
   $ hg stack
   ### topic: tools (2 heads)
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t4: Adding drill
   t3: Adding saw
   t1^ Adding hammer to the shopping list (base)
@@ -1761,7 +1761,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t4@ Adding drill (current)
   t3: Adding saw
   t2: Adding nails
@@ -1835,7 +1835,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t4@ Adding drill (current)
   t3: Adding saw
   t2: Adding nails
@@ -1874,7 +1874,7 @@
 
   $ hg stack
   ### topic: tools
-  ### branch: default, 2 behind
+  ### target: default (branch), 2 behind
   t5@ Adding screws (current)
   t4: Adding drill
   t3: Adding saw
--- a/tests/test-topic.t	Tue Sep 26 13:01:21 2017 +0200
+++ b/tests/test-topic.t	Sun Sep 24 11:30:14 2017 +0200
@@ -143,7 +143,7 @@
    * narf (on branch: default, 0 changesets)
   $ hg stack
   ### topic: narf
-  ### branch: default
+  ### target: default (branch)
   (stack is empty)
   t0^ Add file delta (base)
 
@@ -882,7 +882,7 @@
 
   $ hg stack
   ### topic: changewut (2 heads)
-  ### branch: default, 5 behind
+  ### target: default (branch), 5 behind
   t3: fran?
   t1^ start on fran (base)
   t2@ gamma (current)
@@ -897,7 +897,7 @@
    * changewut
   $ hg stack
   ### topic: changewut (2 heads)
-  ### branch: default, 5 behind
+  ### target: default (branch), 5 behind
   t3: fran?
   t1^ start on fran (base)
   t2: gamma