[darcs-users] Fwd: Execute Automatic command with each commit

Max Battcher me at worldmaker.net
Fri Feb 1 03:26:25 UTC 2008


Nathan Gray wrote:
> So in my scenario, I have a central development repo that generates HTML
> documentation from source code that is pushed to it.  I would like to
> only generate documentation for files that are affected by the push,
> rather than all files in the repo.  Somehow my documentation generating
> program needs to be told which files to process via the posthook.

In one of my repos I've just been using something like:

find -mtime -1 | my_posthook

I realize it's not a perfect solution, but if you are desperate for any 
solution its a working stopgap.

I know that several proposals have been made for what might be done to 
pass information to posthooks, but would a simple "pipe-mode" for 
posthook be able to make use of existing code, and thus maybe be 
something that could be finished sooner rather than later?

That is give me an option to get the equivalent of ``darcs changes -s 
--xml-output`` for just the newly applied patches piped to my 
posthook...  I would assume you could just use the printing code already 
used by darcs changes and just redirect standard output to a pipe to a 
posthook.

--
--Max Battcher--
http://www.worldmaker.net/


More information about the darcs-users mailing list