[darcs-users] Re: File/Directory Metadata

Mark Stosberg mark at summersault.com
Sun Nov 14 12:45:12 UTC 2004

On 2004-11-14, Michael Conrad <conradme at email.uc.edu> wrote:
> *However* there are people out there who want to preserve
> ownership, and currently darcs is "not for them".  They use other things
> like rsync.

rsync? What do those people use for version control? :) 

> *** Minor instant brainstorm
> What if darcs had the ability to run a script on applying a patch (as
> suggested previously) and the meta tags were defined as environment
> variables while running the script for a given file!  This would make it
> trivial to set the permissions for a file:
>   #!/bin/sh
>   chmod $unix_perm $CURRENT_FILE

Something like this can be done with darcs now (although I haven't tried it). 

1. move the 'darcs' binary to 'darcs-bin'
2. Create a script named 'darcs' that adds the hooks you want. 

You wouldn't have access to $CURRENT_FILE and other bits as in your
example, but you could run scripts like you want on the whole repo to
'fix' line endings and perms, etc. 

I wouldn't mind some standard 'pre' and 'post' hooks to make
scripting even easier, though.

(So far I haven't needed it).


More information about the darcs-users mailing list