localrepo: call lock.lock with releasefn as a keyword arg
authorSiddharth Agarwal <sid0@fb.com>
Tue, 22 Sep 2015 13:25:41 -0700
changeset 26320 3ac7acb99b04
parent 26319 4b9bb1616195
child 26321 db4c192cb9b3
localrepo: call lock.lock with releasefn as a keyword arg We'll be adding an acquirefn argument soon, and this makes that clearer.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Wed Aug 19 15:11:17 2015 -0500
+++ b/mercurial/localrepo.py	Tue Sep 22 13:25:41 2015 -0700
@@ -1210,7 +1210,7 @@
 
     def _lock(self, vfs, lockname, wait, releasefn, acquirefn, desc):
         try:
-            l = lockmod.lock(vfs, lockname, 0, releasefn, desc=desc)
+            l = lockmod.lock(vfs, lockname, 0, releasefn=releasefn, desc=desc)
         except error.LockHeld as inst:
             if not wait:
                 raise
@@ -1219,7 +1219,7 @@
             # default to 600 seconds timeout
             l = lockmod.lock(vfs, lockname,
                              int(self.ui.config("ui", "timeout", "600")),
-                             releasefn, desc=desc)
+                             releasefn=releasefn, desc=desc)
             self.ui.warn(_("got lock after %s seconds\n") % l.delay)
         if acquirefn:
             acquirefn()