stack: add "t" prefix to index in the output
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 14 Mar 2016 18:40:00 +0000
changeset 1905 3b42478ef017
parent 1904 f52c02bf47b7
child 1906 5e9ce6310720
stack: add "t" prefix to index in the output This make the existance and meaning of "t2" reference clearer.
hgext3rd/topic/stack.py
tests/test-topic-stack.t
--- a/hgext3rd/topic/stack.py	Mon Mar 14 18:39:19 2016 +0000
+++ b/hgext3rd/topic/stack.py	Mon Mar 14 18:40:00 2016 +0000
@@ -20,7 +20,7 @@
         raise error.Abort(_('no active topic to list'))
     for idx, r in enumerate(getstack(repo, topic)):
         # super crude initial version
-        l = "%d: %s\n" % (idx, repo[r].description().splitlines()[0])
+        l = "t%d: %s\n" % (idx, repo[r].description().splitlines()[0])
         ui.write(l)
 
 # Copied from evolve 081605c2e9b6
--- a/tests/test-topic-stack.t	Mon Mar 14 18:39:19 2016 +0000
+++ b/tests/test-topic-stack.t	Mon Mar 14 18:40:00 2016 +0000
@@ -57,10 +57,10 @@
   $ hg topic
    * foo
   $ hg topic --list
-  0: c_c
-  1: c_d
-  2: c_e
-  3: c_f
+  t0: c_c
+  t1: c_d
+  t2: c_e
+  t3: c_f
 
 error case, nothing to list
 
@@ -104,7 +104,7 @@
   o  0 default {} draft c_a
   
   $ hg topic --list
-  0: c_c
-  1: c_d
-  2: c_e
-  3: c_f
+  t0: c_c
+  t1: c_d
+  t2: c_e
+  t3: c_f