record: define inferrepo in command decorator
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 04 May 2014 22:36:07 -0700
changeset 21787 fb5f34bb3867
parent 21786 c85a0c3537b2
child 21788 c20843aee8a4
record: define inferrepo in command decorator
hgext/record.py
--- a/hgext/record.py	Sun May 04 22:30:47 2014 -0700
+++ b/hgext/record.py	Sun May 04 22:36:07 2014 -0700
@@ -460,7 +460,10 @@
     dorecord(ui, repo, committomq, 'qrefresh', True, *pats, **opts)
 
 # This command registration is replaced during uisetup().
-@command('qrecord', [], _('hg qrecord [OPTION]... PATCH [FILE]...'))
+@command('qrecord',
+    [],
+    _('hg qrecord [OPTION]... PATCH [FILE]...'),
+    inferrepo=True)
 def qrecord(ui, repo, patch, *pats, **opts):
     '''interactively record a new patch
 
@@ -659,5 +662,3 @@
 def _wrapcmd(cmd, table, wrapfn, msg):
     entry = extensions.wrapcommand(table, cmd, wrapfn)
     entry[1].append(('i', 'interactive', None, msg))
-
-commands.inferrepo += " record qrecord"