mercurial/localrepo.py
changeset 26488 df2dc5141721
parent 26475 efd57cd6fd1d
child 26489 2a3fc0272e3f
equal deleted inserted replaced
26487:3f234db6fe8d 26488:df2dc5141721
  1298                        self.invalidatedirstate, _('working directory of %s') %
  1298                        self.invalidatedirstate, _('working directory of %s') %
  1299                        self.origroot, parentenvvar='HG_WLOCK_LOCKER')
  1299                        self.origroot, parentenvvar='HG_WLOCK_LOCKER')
  1300         self._wlockref = weakref.ref(l)
  1300         self._wlockref = weakref.ref(l)
  1301         return l
  1301         return l
  1302 
  1302 
       
  1303     def _currentlock(self, lockref):
       
  1304         """Returns the lock if it's held, or None if it's not."""
       
  1305         if lockref is None:
       
  1306             return None
       
  1307         l = lockref()
       
  1308         if l is None or not l.held:
       
  1309             return None
       
  1310         return l
       
  1311 
  1303     def _filecommit(self, fctx, manifest1, manifest2, linkrev, tr, changelist):
  1312     def _filecommit(self, fctx, manifest1, manifest2, linkrev, tr, changelist):
  1304         """
  1313         """
  1305         commit an individual file as part of a larger transaction
  1314         commit an individual file as part of a larger transaction
  1306         """
  1315         """
  1307 
  1316