changeset 26320:3ac7acb99b04

localrepo: call lock.lock with releasefn as a keyword arg We'll be adding an acquirefn argument soon, and this makes that clearer.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 22 Sep 2015 13:25:41 -0700
parents 4b9bb1616195
children db4c192cb9b3
files mercurial/localrepo.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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()