[MERGE][RFC] Enhanced hooks
Robert Collins
robertc at robertcollins.net
Wed Feb 6 05:21:55 GMT 2008
On Wed, 2008-02-06 at 14:57 +1000, Ian Clatworthy wrote:
>
> I'd /really/ like a small change to the core to make the plugin
> simpler
> and more efficient, namely changing the lookup (not registration) of
> hooks to be via the object, not the Branch.hooks or
> SmartTCPServer.hooks
> singletons. So
>
> for hook in Branch.hooks['post_uncommit']:
>
> would become
>
> for hook in branch.iter_hooks('post_uncommit'):
>
> for example. If that sounds ok, I'll put up a small patch for that
> change. If it doesn't, then shell hooks beyond Jelmer's plugin will
> need
> to wait a while - other priorities have taken over for me.
I have two concerns about this.
One is that it leads to two places hooks can be for any given gook and
makes things less clear for debugging. I think you can do your shell
hook stuff really very cleanly without this change. (On IRC I suggested
one way; in a later mail I suggested two ways, and the latter is
probably cleaner in all regards - its commensurate with regular hooks).
Not to mention me providing an implementation of pre-commit checking
thunk for shell thats clean, will work well, and is ~ 14 lines long.
-Rob
--
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/20080206/8a4015c3/attachment.pgp
More information about the bazaar
mailing list