Code review comment for lp:~jelmer/bzr/uninstall-hook

Revision history for this message
Andrew Bennetts (spiv) wrote :

Jelmer Vernooij wrote:
> On Wed, 2011-03-30 at 12:59 +0000, Andrew Bennetts wrote:
> > What happens if two calls to install_named_hook use the same label?
> Bad things (basically, the first one with the label will be removed).
>
> I guess the alternative is to allow uninstalling by callable, but that
> will require loading all lazy hooks. Would that be an issue?

Another alternative would be to return a unique handle from
install_named_hook. Possibly an object with a .uninstall() method for
extra convenience.

I suspect it'd be fiddly to extend the registry objects to support that,
though.

« Back to merge proposal