Mercurial > evolve
diff hgext3rd/topic/stack.py @ 1998:302be26a3fd8
stack: add warning about multiple heads
This seems a good spot to nudge people toward reducing there head count.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 26 Aug 2016 21:57:48 +0200 |
parents | ce86f7bb4b7b |
children | 61d595ce8994 |
line wrap: on
line diff
--- a/hgext3rd/topic/stack.py Fri Aug 26 14:55:58 2016 +0200 +++ b/hgext3rd/topic/stack.py Fri Aug 26 21:57:48 2016 +0200 @@ -26,8 +26,15 @@ label = 'topic.active' data = stackdata(repo, topic) - fm.plain(_('### topic: %s\n') % ui.label(topic, label), + fm.plain(_('### topic: %s') % ui.label(topic, label), label='topic.stack.summary.topic') + + if 1 < data['headcount']: + fm.plain(' (') + fm.plain('%d heads' % data['headcount'], + label='topic.stack.summary.headcount.multiple') + fm.plain(')') + fm.plain('\n') fm.plain(_('### branch: %s') % '+'.join(data['branches']), # XXX handle multi branches label='topic.stack.summary.branches')