CVS client/server doesn't change LF to CRLF

Charles S. Wilson cwilson@ece.gatech.edu
Sat Apr 28 03:01:00 GMT 2001


"Matthew D. Langston" wrote:
> 
> I thought CVS was supposed to change the line endings of text files from LF
> to CRLF when the client is Windows and the CVS repository resides on UNIX.

But your client isn't windows.  It's cygwin.
 
> This isn't happening for me. 

Right.  You're not on windows.

> When I do a cvs checkout under Windows 2000
> using my cygwin version of cvs and ssh of a repository that resides on our
> UNIX cluster, all text files still end in LF.
[snip]
> I'm certain that I am probably doing something wrong, because I know the CVS
> client/server LF to CRLF translation feature was added sometime circa 1996.

Yep.  Native windows builds explicitly open the destination files in
textmode.

> I have tried doing checkouts of several projects from a few of our UNIX CVS
> repositories from my Windows 2000 computer with the same results (i.e. text
> files with line endings of only LF, not CRLF).

Not surprising that this did not make a difference.  It's a client side
thing, not
a server-side thing.

> I have tried the checkouts
> from both my cygwin bash shell, and from the MS-DOS prompt, thinking that
> there might be a difference.

Nope, it's a client file-IO thing, not a console-IO thing.

> All of my cygwin directories are mounted in
> binmode.

This is the "problem".  If you want the files on your hard drive to be
text (DOS) mode, then you need to checkout onto a drive that is mounted
in textmode.  HOWEVER: the native windows build of cvs has many hooks in
it to deal with the CR/LF translation issue (e.g. so that cvs diff
output is okay, and cvs update doesn't go haywire).  The cygwin build of
cvs just relies on the kernel's (cygwin1.dll) support of dos/unix mode
mounting.  I do NOT KNOW if that is sufficient to make 'cvs diff' and
'cvs update' act correctly in these circumstances.

Try it somewhere non-critical (and report back to the list)

--Chuck

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list