[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Hooks...
From: |
Matthew Sackman |
Subject: |
Re: [Monotone-devel] Hooks... |
Date: |
Wed, 5 Sep 2007 13:54:23 +0100 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
On Wed, Sep 05, 2007 at 02:47:52PM +0200, Richard Levitte wrote:
> We need to think a few steps further, me thinks:
>
> - What do we do with the values returned by the hook functions,
> especially if one event has more than one hook function registered?
On registration you have a priority. Registration errors if two
functions are registered with the same priority. Result: total ordering
between registered hook functions.
Each hook can return one of three values: everything ok; non-fatal
error; fatal error.
> - Do we want to make it possible to give a priority to hook functions?
> That would require a priority parameter to add_hook().
Yep. See above.
> - Do we want a third function that returns information about a hook,
> such as how many functions are attached and their identities (the id
> returned by add_hook()), and whatever other data there may be.
How do imagine this to be used? I don't see the value of it from the
hook's perspective, and whilst it could be valueable to a user, if the
user doesn't know what hooks they have registered then they have other
problems.
> - Do we want to be able to identify some hook functions by name?
Probably useful with regard to error reporting.
Matthew
--
Matthew Sackman
http://www.wellquite.org/
- [Monotone-devel] Hooks..., Richard Levitte, 2007/09/05
- Re: [Monotone-devel] Hooks..., Nathaniel Smith, 2007/09/05
- Re: [Monotone-devel] Hooks..., Richard Levitte, 2007/09/05
- Re: [Monotone-devel] Hooks..., Nathaniel Smith, 2007/09/05
- Re: [Monotone-devel] Hooks..., Stephen Leake, 2007/09/05
- Re: [Monotone-devel] Hooks..., Alex Queiroz, 2007/09/06