Comments
Patch
@@ -454,16 +454,18 @@ def qrefresh(origfn, ui, repo, *pats, **
# were accepted. All other changes were reverted.
# 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().
+@command('qrecord', [], _('hg qrecord [OPTION]... PATCH [FILE]...'))
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:
@@ -632,20 +634,16 @@ def dorecord(ui, repo, commitfunc, cmdsu
orig(chunk, label=label + l)
oldwrite = ui.write
extensions.wrapfunction(ui, 'write', wrapwrite)
try:
return cmdutil.commit(ui, repo, recordfunc, pats, opts)
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')
except KeyError:
return
cmdtable["qrecord"] = \
(qrecord,