[darcs-users] sending notices when a repo changes

Dave Roberts ldave at droberts.com
Tue Mar 8 06:45:59 UTC 2005


On Sun, 2005-03-06 at 11:44 +0100, Gerhard Siegesmund wrote:

> I wouldn't bind hooks to commands only. I think a better solution would
> be to do event-based hooks. Like e.g.:
> 
> - after a patch was applied
> - before a patch is applied (with return-code-checking)
> - after all patches in a group were applied (e.g. darcs pull -a)
> - before all patches in a group are applied (with return-code-checking)
> - after a log-entry is entered (with return-code-checking)
> - before creating a distribution (with return-code-check?)
> - after creating a distribution
> - etc. etc.
> 
> I think such event-based hooks could simplify the scripts. The idea
> behind this event-hooks is, that there are several command e.g. which
> apply patches to a repository. So. If you want to do something after
> patches where applied, you would have to add the hook to get, pull,
> push, record, maybe more (hopefully "put" in the future. :)).

I agree with this. Much better to fire off other actions based on the
changes happening to the repository rather than just the command that is
causing that change. Of course, it would be great to have command-based
hooks, too, but the event-based seem the way to go in the large.

-- 
Dave Roberts <ldave at droberts.com>





More information about the darcs-users mailing list