Mercurial > hg
diff mercurial/interfaces/repository.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 | f34887316f1f |
children | 3a2df812e1c7 |
line wrap: on
line diff
--- a/mercurial/interfaces/repository.py Thu Mar 23 11:24:47 2023 +0000 +++ b/mercurial/interfaces/repository.py Thu Mar 23 21:18:14 2023 +0000 @@ -1810,6 +1810,9 @@ def lock(wait=True): """Lock the repository store and return a lock instance.""" + def currentlock(): + """Return the lock if it's held or None.""" + def wlock(wait=True): """Lock the non-store parts of the repository."""