diff hgext3rd/topic/__init__.py @ 1973:e97458bf53be

stack: introduce and explicite command to display the stack If is worth testing having the feature lives outside 'hg topic --list'. The 'stack' name is sub optimal because the conflict with 'status'. using "hg st" would still work as 'st' is hard coded, but this mean 'hg stack' has no short version.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 12 Aug 2016 11:09:26 +0200
parents 04ce84b7b9d1
children 20fb4195bfc4
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Thu Aug 11 22:52:49 2016 +0200
+++ b/hgext3rd/topic/__init__.py	Fri Aug 12 11:09:26 2016 +0200
@@ -268,6 +268,13 @@
         marker = '*' if t == current else ' '
         ui.write(' %s %s\n' % (marker, t))
 
+@command('stack [TOPIC]', [] + commands.formatteropts)
+def cmdstack(ui, repo, topic='', **opts):
+    """list all changesets in a topic
+
+    List the current topic by default."""
+    return stack.showstack(ui, repo, topic, opts)
+
 def summaryhook(ui, repo):
     t = repo.currenttopic
     if not t: