[darcs-users] a question regarding prehooks

Nathan Gray kolibrie at graystudios.org
Fri Aug 20 13:14:16 UTC 2010


On Fri, Aug 20, 2010 at 02:11:37PM +0200, Benjamin Franksen wrote:
> I am trying to use a prehook to modify some of the file(s) changed before 
> they become recorded. But I found no way to find out, from the hooked 
> script, what files have been changed. Is there a way? If not, I would put 
> this as a feature request. I imagine something like putting
> 
>   apply prehook COMMAND '%N' '%D' '%A' '%F'
> 
> into _darcs/prefs/defaults. When COMMAND gets called, darsc passes it the 
> listed arguments on the command line, replacing %{N,D,A,F} etc by, 
> respectively, patch name, date, author, and a list of files touched.

This is available for posthooks, via environment variables
(except under Windows).

  http://darcs.net/manual/node7.html#SECTION00712000000000000000

> Would this be possible/desirable?

It might not be possible for all commands (such as 'record', which
will not know which patches will be selected).  It might be
possible for commands like 'apply'.

-kolibrie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100820/b91c9aba/attachment.pgp>


More information about the darcs-users mailing list