changeset 21251:a836fa58b512

record: declare commands using decorator
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 May 2014 22:35:37 -0700
parents 8d354d58147c
children da0eb4970913
files hgext/record.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/record.py	Sun May 04 21:31:51 2014 -0700
+++ b/hgext/record.py	Sun May 04 22:35:37 2014 -0700
@@ -459,6 +459,8 @@
     # 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 @@
     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')