Comment 9 for bug 50329

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 50329] Re: [Bug 50329] Re: commit code requires plugins to be loaded

On Mon, 2006-07-24 at 00:38 +0000, Robert Collins wrote:
> On Mon, 2006-07-24 at 00:06 +0000, Jelmer Vernooij wrote:
> > Well, if hooks are registered by the plugins, there will no longer be
> > any hooks specified by the user, so there won't be an error at all.
> That forces every plugin to have an 'enable option'. Thats also
> undesirable.
In some cases, yes. However, in most cases there are other ways for the
plugin to find out whether it should work on a specific commit. For
example, the email plugin can only be used when a target email address
is set, the cia plugin only when a project is set, etc.

Either way, in those few cases where necessary 'enable_foo = true' is
much more user friendly than 'post_commit =
bzrlib.plugins.foo.post_commit'.

Anyhow, I'll take this to the mailinglist before having a look at
implementing it.

> This needs much more discussion I think. I agree with john about the
> error needs to be made nicer.
Agreed.

Cheers,

Jelmer

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/