Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 50323:6901916458bd stable
localrepo: add a `currentlock` method
It mirrors he `currentwlock` function.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 23 Mar 2023 21:18:14 +0000 |
parents | 87f0155d68aa |
children | e6532a7336d0 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Mar 23 11:24:47 2023 +0000 +++ b/mercurial/localrepo.py Thu Mar 23 21:18:14 2023 +0000 @@ -3141,6 +3141,10 @@ """Returns the wlock if it's held, or None if it's not.""" return self._currentlock(self._wlockref) + def currentlock(self): + """Returns the lock if it's held, or None if it's not.""" + return self._currentlock(self._lockref) + def checkcommitpatterns(self, wctx, match, status, fail): """check for commit arguments that aren't committable""" if match.isexact() or match.prefix():