changeset 10323:0aa59f532ef9

record: function variable naming & signature cleanup. No functionality change. All tests pass.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 05 Feb 2010 18:46:22 +0100
parents d9a2bc2f776b
children 55d134ef8ab7
files hgext/record.py
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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)