Mercurial > hg
changeset 26489:2a3fc0272e3f
localrepo: add a way to get the current wlock if it's held
This will be useful to pass around a reference to the lock to some functions
we're going to add to scmutil. We don't want those functions to live in
localrepo to avoid bloat.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 05 Oct 2015 14:27:37 -0700 |
parents | df2dc5141721 |
children | f0d730efb02f |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Oct 05 14:26:53 2015 -0700 +++ b/mercurial/localrepo.py Mon Oct 05 14:27:37 2015 -0700 @@ -1309,6 +1309,10 @@ return None return l + def currentwlock(self): + """Returns the wlock if it's held, or None if it's not.""" + return self._currentlock(self._wlockref) + def _filecommit(self, fctx, manifest1, manifest2, linkrev, tr, changelist): """ commit an individual file as part of a larger transaction