[darcs-users] CRLF Problem

David Roundy droundy at darcs.net
Tue Apr 17 21:38:10 UTC 2007


Yes, pre-hooks are definitely desired, it's just that noone has gone ahead
and implemented them.  I don't see any reason they'd be harder than
post-hooks--except that you'd have to check the exit value to determine
whether to proceed, which is easy.

We've had discussion of the features we'd like, and this is on the list,
it's just that (to my knowledge) no darcs developers want it themselves.
Most of the discussion focussed on tricky things like pre- and post-hook
that access some darcs metadata (e.g. names of patches being applied).
This is much more tricky, but we pretty much know how we want to do the
communication, which is via environment variables, which means that it's
easy to make more data available without changing the existing interface.

David

On Fri, Apr 13, 2007 at 09:24:37AM -0600, Goldstein, Ken wrote:
> Our company uses Serena ChangeMan for their main version control system.
> I don't like ChangeMan, but it handles the CRLF issue invisibly. Someone
> else on this list stated that Subversion has an option to handle this
> issue automatically as well.  Is this on the ToDo list for Darcs?
> 
> Ralph below suggested a prehook option.  I only saw posthook options
> available. I assume that the way to simulate a prehook would be to build
> a wrapper program around a command with a similar name.
> example "darcswhatsnew" 
> This solution is flawed though, as the developers will accidentally use
> the real darcs command as they are using "darcs COMMAND" for everything
> else. Therefore, I believe that "prehook" is another option that Darcs
> really could use.
> 
> ----
>  
> >I'd much rather have a pre-record hook that could run any program
> >to alter the source before it gets recorded. You could set it to
> >a script that looked at all of your files and did line-ending
> >conversion. Any other source-code transformation could also be
> >added as a pre-record hook, without having to alter darcs.
> >
> >A set of scripts on the darcs wiki for common transformations
> >(line-ending conversion, indentation normalization, XML tidy, ...)
> >could handle common use cases.
> >
> >What do you think?
> >
> >Josh



More information about the darcs-users mailing list