Re: [Monotone-devel] Hooks

2008-10-10 Thread Daniel Carrera
Ludovic Brenta wrote: I'm not very comfortable with lua either and my first move was to write a shell script along the lines of: #!/bin/sh head=$(mtn automate get_base_workspace_revision) parent=$(mtn automate select p:$head) sed -i -r 's,old_revision \[.*\],old_revision [$parent],'

Re: [Monotone-devel] Hooks

2008-10-10 Thread Ludovic Brenta
Daniel Carrera writes: Ludovic Brenta wrote: I'm not very comfortable with lua either and my first move was to write a shell script along the lines of: #!/bin/sh head=$(mtn automate get_base_workspace_revision) parent=$(mtn automate select p:$head) sed -i -r 's,old_revision

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Stephen Leake
Richard Levitte [EMAIL PROTECTED] writes: 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? That would at least

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Alex Queiroz
Hallo, On 9/5/07, Richard Levitte [EMAIL PROTECTED] wrote: 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?

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Richard Levitte
In message [EMAIL PROTECTED] on Wed, 5 Sep 2007 09:34:01 -0300, Alex Queiroz [EMAIL PROTECTED] said: asandroq Hallo, asandroq asandroq On 9/5/07, Richard Levitte [EMAIL PROTECTED] wrote: asandroq asandroq So I've a proposal to make this easier, and it's to have a hook asandroq registry in

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Matthew Sackman
On Wed, Sep 05, 2007 at 02:47:52PM +0200, Richard Levitte wrote: We need to think a few steps further, me thinks: - What do we do with the values returned by the hook functions, especially if one event has more than one hook function registered? On registration you have a priority.

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Richard Levitte
In message [EMAIL PROTECTED] on Wed, 5 Sep 2007 13:54:23 +0100, Matthew Sackman [EMAIL PROTECTED] said: matthew On Wed, Sep 05, 2007 at 02:47:52PM +0200, Richard Levitte wrote: matthew We need to think a few steps further, me thinks: matthew matthew - What do we do with the values returned

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Alex Queiroz
Hallo, On 9/5/07, Richard Levitte [EMAIL PROTECTED] wrote: Good. We need to decide how that should work, because nil doesn't necessarely imply an error (let alone that it doesn't describe the fatality of an error). The hooks could return two values: The hook result and a status code or

Re: [Monotone-devel] Hooks...

2007-09-05 Thread hendrik
On Wed, Sep 05, 2007 at 01:54:23PM +0100, Matthew Sackman wrote: How do imagine this to be used? I don't see the value of it from the hook's perspective, and whilst it could be valueable to a user, if the user doesn't know what hooks they have registered then they have other problems. If a

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Matthew Sackman
On Wed, Sep 05, 2007 at 03:19:02PM +0200, Richard Levitte wrote: In message [EMAIL PROTECTED] on Wed, 5 Sep 2007 13:54:23 +0100, Matthew Sackman [EMAIL PROTECTED] said: matthew Each hook can return one of three values: everything ok; matthew non-fatal error; fatal error. Good. We need to

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Nathaniel Smith
On Wed, Sep 05, 2007 at 02:47:52PM +0200, Richard Levitte wrote: We need to think a few steps further, me thinks: - What do we do with the values returned by the hook functions, especially if one event has more than one hook function registered? - Do we want to make it possible to give a

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Richard Levitte
In message [EMAIL PROTECTED] on Wed, 5 Sep 2007 07:20:01 -0700, Nathaniel Smith [EMAIL PROTECTED] said: njs but presumably the goal is to solve real problems :-). Right. However, there are such things as foreseeable problems as well, as long as we don't go too far into lah-lah-land. njs The

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Nathaniel Smith
On Wed, Sep 05, 2007 at 04:50:26PM +0200, Richard Levitte wrote: In message [EMAIL PROTECTED] on Wed, 5 Sep 2007 07:20:01 -0700, Nathaniel Smith [EMAIL PROTECTED] said: njs but presumably the goal is to solve real problems :-). Right. However, there are such things as foreseeable

Re: [Monotone-devel] Hooks...

2007-09-05 Thread Stephen Leake
Matthew Sackman [EMAIL PROTECTED] writes: On Wed, Sep 05, 2007 at 03:19:02PM +0200, Richard Levitte wrote: In message [EMAIL PROTECTED] on Wed, 5 Sep 2007 13:54:23 +0100, Matthew Sackman [EMAIL PROTECTED] said: matthew Each hook can return one of three values: everything ok; matthew

Re: [Monotone-devel] hooks documentation error

2007-02-25 Thread Bruce Stephens
Evan Martin [EMAIL PROTECTED] writes: From http://monotone.ca/docs/Hooks.html, with italics represented /like this/: note_netsync_revision_received (new_id, revision, certs, session_id) Called by monotone after the revision /new_id/ is received through netsync. /revision/ is the text of