Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-08-08 20:42:06


OK, thanks to Bill, Paul, and Dave for the explanation of what happened and
why it happened.

Now, how to fix it? (I'm assuming it is something that we want to fix.) I
can easily convert all the \r\r\n to \r\n. (This is on a Windows machine.)

If that leaves any stray \r not followed by \n, add the missing \n. (This
fixes any files edited on a Mac or having \r not followed by \n for other
reasons.)

Then just do a regular commit? or a forced commit? I guess I could try on
one file first to make sure it works as expected.

Dave, would you like me to do that, or would you rather fix the files
yourself?

--Beman

--- meat of the replies follows ---

William E. Kempf wrote:

>The problem occurs when a file on Unix has DOS line endings. This should
>rarely occur, since checking a file out of CVS will usually convert line
>endings to the native Unix type. But say you work in both environments
and
>you transfer a file from your Windows box to the Unix box with some
>mechanism that doesn't conver the line endings, such as a binary FTP
(just
>one of many examples possible here). You then commit or update CVS with
>this file and you get \r\r\n.

Paul Mensonides wrote:

>If I have a file with DOS line endings (e.g. \r\n) that I wrote on a
>Windows box, then transferred that file to a Unix box and commited it
with
>CVS, CVS won't convert the line-endings to plain (\n). When that
happens,
>you end up with \r\n line-endings on the CVS server, which is not
supposed
>to happen. Consequently, if you checkout (or update) with CVS from a
>Windows box, CVS will obliviously replace the '\n' in '\r\n' with '\r\n',
>which will give you the grand result of '\r\r\n'.

Dave Abrahams wrote:

>Long story -- I've been working with a .cvsrc on my windows machine which
>contains:
>
> cvs -z9 --lf
>
>Which tells it to use unix newlines. That's because I was working with a
>cross-mounted CVS tree on a linux machine for a while. However, when I
make
>a new file it starts with DOS line endings unless I say otherwise. So
I've
>been checking in a lot of files with DOS line endings by mistake. I
correct
>them as I find them, but haven't been systematic. It's time I removed
>the --lf from my .cvsrc, but I have to get a fresh CVS tree in order to
do
>that.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk