diff hgext3rd/topic/stack.py @ 1997:ce86f7bb4b7b

stack: add some behind information This is the next useful thing after branch
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 26 Aug 2016 14:55:58 +0200
parents 5c40dd2cf131
children 302be26a3fd8
line wrap: on
line diff
--- 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]