# HG changeset patch # User Gregory Szorc # Date 2014-05-05 05:35:37 # Node ID a836fa58b5124ee0b2b4f6d48bf27ea29faa81a9 # Parent 8d354d58147c96978d09fd4fb0ce55562c48b955 record: declare commands using decorator diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -459,6 +459,8 @@ def qrefresh(origfn, ui, repo, *pats, ** # backup all changed files dorecord(ui, repo, committomq, 'qrefresh', True, *pats, **opts) +# This command registration is replaced during uisetup(). +@command('qrecord', [], _('hg qrecord [OPTION]... PATCH [FILE]...')) def qrecord(ui, repo, patch, *pats, **opts): '''interactively record a new patch @@ -637,10 +639,6 @@ def dorecord(ui, repo, commitfunc, cmdsu finally: ui.write = oldwrite -cmdtable["qrecord"] = \ - (qrecord, [], # placeholder until mq is available - _('hg qrecord [OPTION]... PATCH [FILE]...')) - def uisetup(ui): try: mq = extensions.find('mq')