[darcs-users] CRLF Problem

Kurt Granroth darcs-users at granroth.org
Fri May 4 04:46:48 UTC 2007


Jason Dagit wrote:
> What sort of tools/editor are you using that are so sensitive to line
> endings?  Myself, when I'm developing on windows I'm usually using
> emacs, visual studio or textpad; none of which have issues with line
> endings.  On unix I use emacs or vi and have no problems there either.

A number of us use vim and emacs and those, as you know, are fine.  The
killer app (and not in a good way, this time) is VC++6.  To start, it
absolutely requires that the .dsp and .dsw files be in DOS format.  We
got around that initially by just importing those files into the initial
repository in DOS format since those would never be used by the Unix
team anyway.  However, we quickly noticed that the VC++ editor appends
CRLF on all edited lines.  Arg!!

So yeah, all of our headaches are directly related to the relatively few
(but necessary) VC++ users that cannot be convinced to edit their files
in something else.  Hence, we need an all DOS version of the repo.

> Have your seen TortoiseDarcs?  http://tortoisedarcs.sourceforge.net/

No!  How did I miss that?  That's exactly what I've been looking for (to
start) in a darcs GUI.  Those CVS users that don't use WinCVS are all
TortoiseCVS fans so migrating to TortoiseDarcs will be an easy sell.

/me dancing a jig right about now :-D

I'll be checking it out tomorrow to see how that affects my situation.
Does it do any sort of CRLF conversion internally, perhaps?

>> At this point, I run the attached 'darcs2dos' script which converts all
>> non-binary files in pristine and the working tree into DOS format
>> *and* tries
>> to convert the patches as well.
> 
> Modifying patches seems like a really, really, really bad idea.

Yeah... but like I said, the CRLF issue is the *only* showstopper and
I'm willing to resort to desperate measures to get past this.

> Do you know Haskell?  Pre-hooks wouldn't be hard to implement if you
> want to get started on it.

Alas, no.  A co-worker has already submitted a few patches to darcs,
though, so maybe I'll steer him towards a pre-hook change when he gets
back from vacation.  He's solidly Unix, so it may take some convincing!

Kurt



More information about the darcs-users mailing list