Mercurial > hg-stable
changeset 41861:90eddb679521
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 04 Mar 2019 16:08:44 +0100 |
parents | 2dbdb9abcc4b |
children | afd37ed731f1 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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