localrepo: explicit `_lock` arguments in `lock`
The argument for `_lock` are non-trivial, having them passed explicitly makes
thing clearer in my opinion. This is a Gratuitous change, I expect it will save
me (and others) time in the future.
--- a/mercurial/localrepo.py Sun Mar 03 17:22:03 2019 -0800
+++ b/mercurial/localrepo.py Mon Mar 04 16:08:44 2019 +0100
@@ -2224,8 +2224,12 @@
l.lock()
return l
- l = self._lock(self.svfs, "lock", wait, None,
- self.invalidate, _('repository %s') % self.origroot)
+ l = self._lock(vfs=self.svfs,
+ lockname="lock",
+ wait=wait,
+ releasefn=None,
+ acquirefn=self.invalidate,
+ desc=_('repository %s') % self.origroot)
self._lockref = weakref.ref(l)
return l