45
from bzrlib.hooks import Hooks
45
from bzrlib.hooks import HookPoint, Hooks
48
48
class LockHooks(Hooks):
50
50
def __init__(self):
51
51
Hooks.__init__(self)
53
# added in 1.8; called with a LockResult when a physical lock is
55
self['lock_acquired'] = []
57
# added in 1.8; called with a LockResult when a physical lock is
59
self['lock_released'] = []
52
self.create_hook(HookPoint('lock_acquired',
53
"Called with a bzrlib.lock.LockResult when a physical lock is "
54
"acquired.", (1, 8), None))
55
self.create_hook(HookPoint('lock_released',
56
"Called with a bzrlib.lock.LockResult when a physical lock is "
57
"released.", (1, 8), None))
62
60
class Lock(object):