equal
deleted
inserted
replaced
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.)''' |