record: function variable naming & signature cleanup.
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>
Fri, 05 Feb 2010 18:46:22 +0100
changeset 10323 0aa59f532ef9
parent 10322 d9a2bc2f776b
child 10324 55d134ef8ab7
record: function variable naming & signature cleanup. No functionality change. All tests pass.
hgext/record.py
--- 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)