Mercurial > evolve
comparison hgext3rd/topic/__init__.py @ 1985:03d6b685c16a
topic: list the number of 'behind' changeset when --verbose is used
Displaying more information in the topic list is useful, we continue with the
number of 'behind' changesets. This 'behind' count the number of new changesets on
the default rebase destination. This will highlight topics that need rebasing.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sun, 14 Aug 2016 19:57:58 +0200 |
parents | bee7a1ef8ba8 |
children | d427fd97c9d5 |
comparison
equal
deleted
inserted
replaced
1984:2a07df823588 | 1985:03d6b685c16a |
---|---|
45 cmdtable = {} | 45 cmdtable = {} |
46 command = cmdutil.command(cmdtable) | 46 command = cmdutil.command(cmdtable) |
47 colortable = {'topic.active': 'green', | 47 colortable = {'topic.active': 'green', |
48 'topic.list.troubledcount': 'red', | 48 'topic.list.troubledcount': 'red', |
49 'topic.list.headcount.multiple': 'yellow', | 49 'topic.list.headcount.multiple': 'yellow', |
50 'topic.list.behindcount': 'cyan', | |
51 'topic.list.behinderror': 'red', | |
50 'topic.stack.index': 'yellow', | 52 'topic.stack.index': 'yellow', |
51 'topic.stack.state.base': 'dim', | 53 'topic.stack.state.base': 'dim', |
52 'topic.stack.state.clean': 'green', | 54 'topic.stack.state.clean': 'green', |
53 'topic.stack.index.current': 'cyan', # random pick | 55 'topic.stack.index.current': 'cyan', # random pick |
54 'topic.stack.state.current': 'cyan bold', # random pick | 56 'topic.stack.state.current': 'cyan bold', # random pick |
305 if 1 < data['headcount']: | 307 if 1 < data['headcount']: |
306 fm.plain(', ') | 308 fm.plain(', ') |
307 fm.write('headcount', '%d heads', | 309 fm.write('headcount', '%d heads', |
308 data['headcount'], | 310 data['headcount'], |
309 label='topic.list.headcount.multiple') | 311 label='topic.list.headcount.multiple') |
312 if 0 < data['behindcount']: | |
313 fm.plain(', ') | |
314 fm.write('behindcount', '%d behind', | |
315 data['behindcount'], | |
316 label='topic.list.behindcount') | |
317 elif -1 == data['behindcount']: | |
318 fm.plain(', ') | |
319 fm.write('behinderror', '%s', | |
320 _('ambiguous destination'), | |
321 label='topic.list.behinderror') | |
310 fm.plain(')') | 322 fm.plain(')') |
311 fm.plain('\n') | 323 fm.plain('\n') |
312 fm.end() | 324 fm.end() |
313 | 325 |
314 def summaryhook(ui, repo): | 326 def summaryhook(ui, repo): |