hgext/record.py
changeset 5932 b014ff3fdaeb
parent 5830 c32d41affb68
child 6163 1f733c2f0165
--- a/hgext/record.py	Wed Jan 23 17:16:33 2008 +0100
+++ b/hgext/record.py	Wed Jan 23 21:49:39 2008 +0300
@@ -364,10 +364,10 @@
     dorecord(ui, repo, record_committer, *pats, **opts)
 
 
-def qrecord(ui, repo, *pats, **opts):
-    '''interactively select changes for qrefresh
+def qrecord(ui, repo, patch, *pats, **opts):
+    '''interactively record a new patch
 
-    see 'hg help record' for more information and usage
+    see 'hg help qnew' & 'hg help record' for more information and usage
     '''
 
     try:
@@ -376,8 +376,10 @@
         raise util.Abort(_("'mq' extension not loaded"))
 
     def qrecord_committer(ui, repo, pats, opts):
-        mq.refresh(ui, repo, *pats, **opts)
+        mq.new(ui, repo, patch, *pats, **opts)
 
+    opts = opts.copy()
+    opts['force'] = True    # always 'qnew -f'
     dorecord(ui, repo, qrecord_committer, *pats, **opts)
 
 
@@ -513,10 +515,10 @@
     "qrecord":
         (qrecord,
 
-         # add qrefresh options
-         mq.cmdtable['^qrefresh'][1],
+         # add qnew options, except '--force'
+         [opt for opt in mq.cmdtable['qnew'][1] if opt[1] != 'force'],
 
-         _('hg qrecord [OPTION]... [FILE]...')),
+         _('hg qrecord [OPTION]... PATCH [FILE]...')),
     }
 
     cmdtable.update(qcmdtable)