[darcs-users] Executing a program when applying patches

Stephane Bortzmeyer bortzmeyer at nic.fr
Sun Nov 7 20:11:32 UTC 2004


With CVS, I like to execute a program ("commitinfo") before commiting
anything so I can test if everything is OK (XML files are valid, Perl
code is syntactically correct, etc). I wonder how to do this with
Darcs.

"test" file, although not documented in depth, seems the good
solution. I therefore do a "darcs setpref test myscript" but I see the
following problems:

* the test file is apparently executed in a fresh repository
(/tmp/testing), which implies a complete "darcs get" of the files. I
understand the rationale (being sure you run the test with the files
actually recorded), but it can be really long when the repository is
large.

* the test file is executed with "darcs record" (OK), "darcs apply"
(OK again) but not with "darcs push". Why? If I want to be sure noone
pushes invalid files in the repository, should I ban te use of push
and use only apply?





More information about the darcs-users mailing list