# HG changeset patch # User Adrian Buehlmann # Date 1305224855 -7200 # Node ID 9bbac962f4ddb8bf5277004ea5f61453eb8d7698 # Parent c16ec14d44b6add94982727b541b218480a64cd0 graphlog: use cmdutil.command decorator diff -r c16ec14d44b6 -r 9bbac962f4dd hgext/graphlog.py --- 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]')), -}