--- a/hgext3rd/topic/stack.py Fri Sep 15 22:48:55 2017 +0530
+++ b/hgext3rd/topic/stack.py Fri Sep 15 23:13:05 2017 +0530
@@ -207,6 +207,9 @@
label = 'topic.active'
data = stackdata(repo, branch=branch, topic=topic)
+ empty = False
+ if data['changesetcount'] == 0:
+ empty = True
if topic is not None:
fm.plain(_('### topic: %s')
% ui.label(topic, label),
@@ -236,6 +239,9 @@
fm.plain('%d behind' % data['behindcount'], label='topic.stack.summary.behindcount')
fm.plain('\n')
+ if empty:
+ fm.plain(_("(stack is empty)\n"))
+
for idx, r in enumerate(stack(repo, branch=branch, topic=topic), 0):
ctx = repo[r]
# special case for t0, b0 as it's hard to plugin into rest of the logic