changeset 21787:fb5f34bb3867

record: define inferrepo in command decorator
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 May 2014 22:36:07 -0700
parents c85a0c3537b2
children c20843aee8a4
files hgext/record.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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"