hgext3rd/topic/stack.py
changeset 1997 ce86f7bb4b7b
parent 1996 5c40dd2cf131
child 1998 302be26a3fd8
--- a/hgext3rd/topic/stack.py	Fri Aug 26 14:23:31 2016 +0200
+++ b/hgext3rd/topic/stack.py	Fri Aug 26 14:55:58 2016 +0200
@@ -28,9 +28,16 @@
     data = stackdata(repo, topic)
     fm.plain(_('### topic: %s\n') % ui.label(topic, label),
              label='topic.stack.summary.topic')
-    fm.plain(_('### branch: %s\n')
+    fm.plain(_('### branch: %s')
              % '+'.join(data['branches']), # XXX handle multi branches
              label='topic.stack.summary.branches')
+    if data['behindcount'] == -1:
+        fm.plain(', ')
+        fm.plain('ambigious rebase destination', label='topic.stack.summary.behinderror')
+    elif data['behindcount']:
+        fm.plain(', ')
+        fm.plain('%d behind' % data['behindcount'], label='topic.stack.summary.behindcount')
+    fm.plain('\n')
 
     for idx, r in enumerate(getstack(repo, topic), 1):
         ctx = repo[r]