[MERGE] Add Hooks.install_named_hook

Wouter van Heyst larstiq at larstiq.dyndns.org
Mon Mar 10 23:22:00 GMT 2008


On Mon, Mar 10, 2008 at 07:41:25PM +0000, Daniel Mark Watkins wrote:
> On Mon, 10 Mar 2008 21:29:26 +0200
> Alexander Belchenko <bialix at ukr.net> wrote:
> > Why we need new method with another name?
> > 
> > def install_hook(self, hook_name, a_callable, label=None):
> > 
> > is enough for me personally.
> This is initially what I was doing.  However, if we want people to name
> their hooks (which I think we do), giving them a DeprecationWarning if
> they don't do so is a Good Thing(TM).

You could do that without having an extra function if you really want.
See bzrlib.workingtree.WorkingTree.move for an example.

Wouter van Heyst



More information about the bazaar mailing list