--- a/src/topic/__init__.py Mon Mar 14 17:09:02 2016 +0000
+++ b/src/topic/__init__.py Mon Mar 14 17:37:39 2016 +0000
@@ -38,6 +38,7 @@
from . import constants
from . import revset as topicrevset
from . import destination
+from . import stack
from . import topicmap
from . import discovery
@@ -165,9 +166,15 @@
@command('topics [TOPIC]', [
('', 'clear', False, 'clear active topic if any'),
('', 'change', '', 'revset of existing revisions to change topic'),
+ ('l', 'list', False, 'show the stack of changeset in the topic'),
])
-def topics(ui, repo, topic='', clear=False, change=None):
+def topics(ui, repo, topic='', clear=False, change=None, list=False):
"""View current topic, set current topic, or see all topics."""
+ if list:
+ if clear or change:
+ raise error.Abort(_("cannot use --clear or --change with --list"))
+ return stack.showstack(ui, repo, topic)
+
if change:
if not obsolete.isenabled(repo, obsolete.createmarkersopt):
raise error.Abort(_('must have obsolete enabled to use --change'))