[MERGE][RFC] Enhanced hooks

Robert Collins robertc at robertcollins.net
Tue Feb 5 00:57:23 GMT 2008

(as before, but I'm going to review the code this time)

-        These are all empty initially, because by default nothing
should get
-        notified.

This change, and the static initialisation of the hooks is bad style
IMO. The fact that we are supplying some stuff that thunks across to
shell is irrelevant - we should initialise that separately. This makes
tests cleaner and provides the ability to have a completely empty *Hook
as desired.

The adapters need docstrings at a minimum, or better yet to be methods
on an adapter objects as they seem to share a lot.

The api change to Hook seems unneeded, you should explain why (or better
yet, as it seems unneeded, don't change it :)).

The python style changes are really very ugly and definitely a step
backwards. We have automatically registered hooks today and they work
great. This is the fundamental thing that is driving the bb:reject - the
rest we can work with.

I don't think the hooks need to be typed either.

Basically I think what you have done is turned a self-registered system
into a manunally registered system. And this is why it is cumbersome to
work with.

I suggest you approach the problem differently and ask yourself 'how can
I get a hook written in shell to auto-register a python callable for
e.g. branch'.


GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080205/c593aa8e/attachment.pgp 

More information about the bazaar mailing list