Mail Archives: djgpp-workers/2000/12/14/18:32:46
> Date: Thu, 14 Dec 2000 13:21:34 -0500
> From: DJ Delorie <dj AT delorie DOT com>
>
> > I think CVS should use binary I/O by default and have an optional
> > switch to use text-mode I/O. This will DTRT in most of the cases:
>
> CVS files have a flag within them that says if the file should be
> binary or text. If the flag says binary, the files must be checked in
> and out in binary.
Right. I was talking about the files that are marked as text in the
repository.
> * When checking in, read the file in text mode in case the user used a
> DOS editor on it.
This doesn't work with DOS batch files. If you read it in text mode,
the CRs get stripped away. After that, checking it out will write it
in binary mode, with Unix-style LFs, and you get an unusable batch
file, because COMMAND.COM won't run it.
> Note that I prefer that this mode be enabled with, say, an entry in
> .cvsrc ($HOME/cvs.ini?) rather than be the default. I'd prefer the
> default to check out text files with CRLF so that the user can use
> their favorite DOS editor, whether it supports unix text format or
> not.
I think binary mode will be better; users whose editors don't support
Unix-style text files are unlikely to be involved in a cross-platform
development. But if others prefer the DOS-style default, I'll settle
for an option.
> A "cvs diff" needs to deal with CRLF/NL conversions automatically for
> text files.
Does it call an external diff.exe? If it does, diff already does TRT,
If CVS has its own diff code, they should follow the same logic as in
the stand-alone diff.
- Raw text -