hgext/record.py
changeset 10323 0aa59f532ef9
parent 10282 08a0f04b56bd
child 10694 d7732d2df54a
child 11235 113536751190
--- a/hgext/record.py	Fri Feb 05 19:10:26 2010 +0100
+++ b/hgext/record.py	Fri Feb 05 18:46:22 2010 +0100
@@ -381,10 +381,7 @@
 
       ? - display help'''
 
-    def record_committer(ui, repo, pats, opts):
-        commands.commit(ui, repo, *pats, **opts)
-
-    dorecord(ui, repo, record_committer, *pats, **opts)
+    dorecord(ui, repo, commands.commit, *pats, **opts)
 
 
 def qrecord(ui, repo, patch, *pats, **opts):
@@ -399,15 +396,15 @@
     except KeyError:
         raise util.Abort(_("'mq' extension not loaded"))
 
-    def qrecord_committer(ui, repo, pats, opts):
+    def committomq(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)
+    dorecord(ui, repo, committomq, *pats, **opts)
 
 
-def dorecord(ui, repo, committer, *pats, **opts):
+def dorecord(ui, repo, commitfunc, *pats, **opts):
     if not ui.interactive():
         raise util.Abort(_('running non-interactively, use commit instead'))
 
@@ -507,7 +504,7 @@
             cwd = os.getcwd()
             os.chdir(repo.root)
             try:
-                committer(ui, repo, newfiles, opts)
+                commitfunc(ui, repo, *newfiles, **opts)
             finally:
                 os.chdir(cwd)