[darcs-users] in search of repository hooks
Jamie Webb
j at jmawebb.cjb.net
Tue Sep 14 00:25:57 UTC 2004
On Mon, Sep 13, 2004 at 02:32:55PM -0700, Sean Perry wrote:
> We use bk here at work and I have used cvs for some time before that. A
> common need is for some kind of 'on this action perform this external
> action' behavior. One place I currently want this is to implement UNIX
> file permissions so +x scripts and 644 files remain that way. It seems
> to me that 'darcs add' could have a hook which would stat the file and
> store the info, then whatever darcs retrieval command would read the
> lists of perms and apply them. The other common uses are email
> notification, bug system and build daemon integration.
I've got some similar use cases. I'm going to write a few scripts that
wrap the relevant darcs commands when I get round to it. It would be
much nicer though to be able to continue using regular darcs commands,
and have darcs run any defined hooks itself.
> I have considered implementing some bare bones code for this but I
> wanted to ask a question first. How do I add meta information to the
> repository? _darcs seems to be per instance and not "global".
Create e.g. a _meta directory and add it? That means users have to
worry about recording metadata changes of course, but I think anything
more clever would require a fairly intimate involvement with darcs
internals. You'd need to calculate the metadata as the record was
happening, figure out how to handle conflicts, etc...
-- Jamie Webb
More information about the darcs-users
mailing list