[MERGE] add lock hooks

Martin Pool mbp at canonical.com
Tue Sep 23 06:46:42 BST 2008


On Thu, Sep 4, 2008 at 2:28 PM, Robert Collins
<robertc at robertcollins.net> wrote:
> Robert Collins has voted resubmit.
> Status is now: Resubmit
> Comment:
> John, Martin has invented a new idiom for using Hooks, via his clone and
> clear_hooks() methods. These are untested - so for my part, this is tweak()
> - if we're going to invent a new approach, it should be tested. (The
> difference is that rather than constructing a new PhysicalLockHooks
> instance, he's reusing the existing one.

As a matter of fact they were tested, in test_hooks.test_clone_and_clear.

Anyhow, while I think the way hooks are handled is not quite right, I
also think that having just this one be different is not good.  Here
is an update which, relative to bzr.dev:

 * Adds a Lock base class
 * Adds Lock.hooks
 * adds lock_acquired and lock_released within it

-- 
Martin <http://launchpad.net/~mbp/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20080923-lock-hooks.py
Type: text/x-python
Size: 22017 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080923/183bd43c/attachment-0001.py 


More information about the bazaar mailing list