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 mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to