[PATCH 35 of 35] record: define inferrepo in command decorator
Gregory Szorc
gregory.szorc at gmail.com
Mon May 5 00:51:40 CDT 2014
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1399268167 25200
# Sun May 04 22:36:07 2014 -0700
# Branch stable
# Node ID 37de367b676d168e3140fbe5dc4c51c5774f6c8a
# Parent 39951943062ce591b534e83d1e4c8dcac9a6f135
record: define inferrepo in command decorator
diff --git a/hgext/record.py b/hgext/record.py
--- a/hgext/record.py
+++ b/hgext/record.py
@@ -455,17 +455,20 @@ def qrefresh(origfn, ui, repo, *pats, **
# We can't pass *pats here since qrefresh will undo all other
# changed files in the patch that aren't in pats.
mq.refresh(ui, repo, **opts)
# backup all changed files
dorecord(ui, repo, committomq, 'qrefresh', True, *pats, **opts)
# This command registration is replaced during uisetup().
- at command('qrecord', [], _('hg qrecord [OPTION]... PATCH [FILE]...'))
+ at command('qrecord',
+ [],
+ _('hg qrecord [OPTION]... PATCH [FILE]...'),
+ inferrepo=True)
def qrecord(ui, repo, patch, *pats, **opts):
'''interactively record a new patch
See :hg:`help qnew` & :hg:`help record` for more information and
usage.
'''
try:
@@ -654,10 +657,8 @@ def uisetup(ui):
_wrapcmd('qnew', mq.cmdtable, qnew, _("interactively record a new patch"))
_wrapcmd('qrefresh', mq.cmdtable, qrefresh,
_("interactively select changes to refresh"))
def _wrapcmd(cmd, table, wrapfn, msg):
entry = extensions.wrapcommand(table, cmd, wrapfn)
entry[1].append(('i', 'interactive', None, msg))
-
-commands.inferrepo += " record qrecord"
More information about the Mercurial-devel
mailing list