info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dos2unix file endings


From: Spiro Trikaliotis
Subject: Re: dos2unix file endings
Date: Fri, 30 Oct 2009 22:18:57 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Rez,

* On Fri, Oct 30, 2009 at 01:03:36PM -0700 Rez P wrote:
  
> Although they get created on Window client machines, how can I ensure
> once they're checked in, they get checked in with Windows file format
> endings stripped off?

This is standard behaviour of CVS as long as you have not configured
anything else. Every text file is checked in with Unix line endings (LF)
only. In fact, you must explicitly mark a file as binary to check in the
Windows line endings.

Having said that, I do not know what exact behaviour WinCVS has here. It
might mess with that somehow. I never used WinCVS but for some small
tests, thus, I cannot comment. WinCVS uses CVSNT internally, which is a
different thing than CVS. 

So, why do you see Windows line endings when you check out? That's
because the CVS client tries to adapt to the line endings that are
present on the system it works. Thus, the CVS changes LF -> CR/LF when
you are using a native Windows client.

(Note: IIRC, the Cygwin CVS client will check out with Unix line endings
if Cygwin is set to Unix line endings. You might want to use that)


To make a long story short: Regardless of the line endings you see on
your Windows system, as long as you do not check in the files as binary
(-kb) explicitly, the files are stored the Unix line endings on the
server. Thus, checking them out on a Linux machine will give them the
correct line endings. (I assume WinCVS + CVSNT behave the same here, or
you have a problem with them. They have a different mailing list,
though.)

Thus, I would not care about the line endings on Windows. If you really,
really need it different, then 

1. use CVS from Cygwin, or
2. mark all files as binary and make sure you check them in after
   dos2unix only


HTH,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]