monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Hooks...


From: Richard Levitte
Subject: [Monotone-devel] Hooks...
Date: Wed, 05 Sep 2007 08:01:02 +0200 (CEST)

Hi,

I'm a little bit concerned about the way hooks work today.  As we have
seen, especially for the netsync hooks, there are a lot of things
people might want to do, and might want to combine!  Unfortunately,
combining several lua scripts filled with the same hooks isn't an easy
task today, and will not be made easier as soon as people want to
start packaging some hooks that can be installed automatically (I've
already pondered making a monotone-cluster package for Debian).

So I've a proposal to make this easier, and it's to have a hook
registry in monotone, and changing the way hooks are implemented to be
anonymous functions that are used as arguments to a registration
function, 'add_hook' perhaps?

This seems, btw, to be the way certain popular programs tend to
evolve.  I've watched the above development happen in emacs years ago
(the add-hook function didn't exist in emacs 18, as I recall it.
Instead, you just defined the hooks as functions, roughly the same we
define our lua hooks today).

Of course, there's an impact, and it's that we need to rethink how
several hook functions would interact with each other, and how you
replace or remove hooks that you don't want!  Maybe a sneak peek at
Apache's module system and how different modules can interact with
each other might give us some inspiration as well...

Thoughts?  Comments?  Apraisals?  Chasing me down the street with
torches and pitchforks ;-)?

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]