localrepo: call lock.lock with releasefn as a keyword arg
We'll be adding an acquirefn argument soon, and this makes that clearer.
--- 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()