mercurial/localrepo.py
changeset 15589 cc24e4ed3e0c
parent 15588 632f4be4d1f3
child 15611 ec8a49c46d7e
equal deleted inserted replaced
15588:632f4be4d1f3 15589:cc24e4ed3e0c
   916         """add a callback to the current repository lock.
   916         """add a callback to the current repository lock.
   917 
   917 
   918         The callback will be executed on lock release."""
   918         The callback will be executed on lock release."""
   919         l = self._lockref and self._lockref()
   919         l = self._lockref and self._lockref()
   920         if l:
   920         if l:
   921             l.postreleasehooks.append(callback)
   921             l.postrelease.append(callback)
   922 
   922 
   923     def lock(self, wait=True):
   923     def lock(self, wait=True):
   924         '''Lock the repository store (.hg/store) and return a weak reference
   924         '''Lock the repository store (.hg/store) and return a weak reference
   925         to the lock. Use this before modifying the store (e.g. committing or
   925         to the lock. Use this before modifying the store (e.g. committing or
   926         stripping). If you are opening a transaction, get a lock as well.)'''
   926         stripping). If you are opening a transaction, get a lock as well.)'''