[RFC] Better hooks for Bazaar
Martin Pool
mbp at sourcefrog.net
Tue Dec 18 04:06:52 GMT 2007
On Dec 18, 2007 12:47 AM, John Arbash Meinel <john at arbash-meinel.com> wrote:
> To start with, a few of our hook apis are:
>
> def some_hook(rich_object):
>
> while others are:
>
> def some_hook(source, target, master, rev_id, other, yet_another,
> oops_missed_one):
>
> I think the "rich_object" is a lot better for hooks.
I agree it's better. Normally (I hope, universally) the object is
called a Result object, and it's the same thing returned from the
high-level operation like .commit. I think consistency there is also
useful.
I think this pattern should also extend to shell hooks - passing data
in to them through environment variables or some other mechanism
allowing future expansion.
--
Martin
More information about the bazaar
mailing list