mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
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.
This commit is contained in:
parent
02ed78a388
commit
faa305db27
@ -1309,6 +1309,10 @@ class localrepository(object):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user