Mercurial > evolve
comparison 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 |
comparison
equal
deleted
inserted
replaced
1996:5c40dd2cf131 | 1997:ce86f7bb4b7b |
---|---|
26 label = 'topic.active' | 26 label = 'topic.active' |
27 | 27 |
28 data = stackdata(repo, topic) | 28 data = stackdata(repo, topic) |
29 fm.plain(_('### topic: %s\n') % ui.label(topic, label), | 29 fm.plain(_('### topic: %s\n') % ui.label(topic, label), |
30 label='topic.stack.summary.topic') | 30 label='topic.stack.summary.topic') |
31 fm.plain(_('### branch: %s\n') | 31 fm.plain(_('### branch: %s') |
32 % '+'.join(data['branches']), # XXX handle multi branches | 32 % '+'.join(data['branches']), # XXX handle multi branches |
33 label='topic.stack.summary.branches') | 33 label='topic.stack.summary.branches') |
34 if data['behindcount'] == -1: | |
35 fm.plain(', ') | |
36 fm.plain('ambigious rebase destination', label='topic.stack.summary.behinderror') | |
37 elif data['behindcount']: | |
38 fm.plain(', ') | |
39 fm.plain('%d behind' % data['behindcount'], label='topic.stack.summary.behindcount') | |
40 fm.plain('\n') | |
34 | 41 |
35 for idx, r in enumerate(getstack(repo, topic), 1): | 42 for idx, r in enumerate(getstack(repo, topic), 1): |
36 ctx = repo[r] | 43 ctx = repo[r] |
37 p1 = ctx.p1() | 44 p1 = ctx.p1() |
38 if p1.obsolete(): | 45 if p1.obsolete(): |