[PATCH 1 of 4] localrepo: call lock.lock with releasefn as a keyword arg
Siddharth Agarwal
sid0 at fb.com
Wed Sep 23 00:15:20 UTC 2015
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1442953541 25200
# Tue Sep 22 13:25:41 2015 -0700
# Node ID 37e382191204560e2cdd8e616c0022907c4f6aa7
# Parent f946c1260035f96aa30052c28e6c68c559677059
localrepo: call lock.lock with releasefn as a keyword arg
We'll be adding an acquirefn argument soon, and this makes that clearer.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1210,7 +1210,7 @@ class localrepository(object):
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 @@ class localrepository(object):
# 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()
More information about the Mercurial-devel
mailing list