Mercurial > hg-stable
changeset 14311:9bbac962f4dd
graphlog: use cmdutil.command decorator
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Thu, 12 May 2011 20:27:35 +0200 |
parents | c16ec14d44b6 |
children | ba883fa211f3 |
files | hgext/graphlog.py |
diffstat | 1 files changed, 10 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/graphlog.py Thu May 12 20:14:42 2011 +0200 +++ b/hgext/graphlog.py Thu May 12 20:27:35 2011 +0200 @@ -19,6 +19,9 @@ from mercurial import cmdutil, commands, extensions from mercurial import hg, util, graphmod +cmdtable = {} +command = cmdutil.command(cmdtable) + ASCIIDATA = 'ASC' def asciiedges(type, char, lines, seen, rev, parents): @@ -302,6 +305,13 @@ ascii(ui, state, type, char, lines, coldata) displayer.close() +@command('glog', + [('l', 'limit', '', + _('limit number of changes displayed'), _('NUM')), + ('p', 'patch', False, _('show patch')), + ('r', 'rev', [], _('show the specified revision or range'), _('REV')), + ] + templateopts, + _('hg glog [OPTION]... [FILE]')) def graphlog(ui, repo, *pats, **opts): """show revision history alongside an ASCII revision graph @@ -385,15 +395,3 @@ return orig(*args, **kwargs) entry = extensions.wrapcommand(table, cmd, graph) entry[1].append(('G', 'graph', None, _("show the revision DAG"))) - -cmdtable = { - "glog": - (graphlog, - [('l', 'limit', '', - _('limit number of changes displayed'), _('NUM')), - ('p', 'patch', False, _('show patch')), - ('r', 'rev', [], - _('show the specified revision or range'), _('REV')), - ] + templateopts, - _('hg glog [OPTION]... [FILE]')), -}