info-cvs
[Top][All Lists]
Advanced

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

RE: line ending conversions


From: Josh Baudhuin
Subject: RE: line ending conversions
Date: Tue, 9 Oct 2001 11:53:26 -0700

Sounds like a problem w/ cygwin build of CVS. It could be circumventing
the I/O library calls which actually abide by the mount attributes,
though this seems like a surprising oversight.
It should probably accommodate both \r\n and \n deliberately in its code
if it's -kk.?, and simply ignore if -kb.

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf
Of Matt McClure
Sent: Tuesday, October 09, 2001 10:11 AM
To: address@hidden
Subject: Re: line ending conversions


On Tue Oct 09 2001, 11:08, Roman Belenov <address@hidden> wrote:

> Matt McClure <address@hidden> writes:
> 
> > But I have also noticed some text files in my repository that have 
> > CRLF line endings.  I think I understand how this happened, but just

> > to confirm...
> > 
> > The files were created with GNU Emacs on Windows 2000, which uses 
> > CRLF line endings, by default.  They were committed to the 
> > repository using Cygwin CVS.  Does Cygwin CVS assume that LF is the 
> > "form appropriate to the operating system on the client", and thus 
> > neglect to convert the line endings?
> 
> Cygwin has concept of binary and text mounts (you can use 'mount' 
> command without arguments to check mount point types on your system). 
> In binary-mounted directories, CRLF<->LF translation is not done for 
> text files so that LF itself is treated as line ending.

Thanks.  I remounted the directory in textmode.  But it still seems that
files I add to the repository get added with the CRLF line endings.

    [mlm CVSROOT]$ pwd
    /cygdrive/c/home/mlm/tmp/CVSROOT
    [mlm CVSROOT]$ mount
    C:\cygwin\bin on /usr/bin type system (binmode)
    C:\cygwin\lib on /usr/lib type system (binmode)
    C:\cygwin on / type system (binmode)
    c: on /cygdrive/c type system (textmode)
    [mlm CVSROOT]$ cat > test
    a line with a CRLF ending
    [mlm CVSROOT]$ cat -A test
    a line with a CRLF ending^M$
    [mlm CVSROOT]$ cvs add -m "" test
    cvs server: scheduling file `test' for addition
    cvs server: use 'cvs commit' to add this file permanently
    [mlm CVSROOT]$ cvs ci -m "" test
    RCS file: /usr/local/mvroot/CVSROOT/test,v
    done
    Checking in test;
    /usr/local/mvroot/CVSROOT/test,v  <--  test
    initial revision: 1.1
    done
    cvs server: Rebuilding administrative file database

In the repository:

    address@hidden CVSROOT]$ cat -A test,v
    head^I1.1;$
    access;$
    symbols;$
    locks; strict;$
    address@hidden @;$
    $
    $
    1.1$
    date^I2001.10.09.16.44.16;^Iauthor mlm;^Istate Exp;$
    branches;$
    next^I;$
    $
    $
    desc$
    @@$
    $
    $
    1.1$
    log$
    @*** empty log message ***$
    @$
    text$
    @a line with a CRLF ending^M$
    @$

Similarly, if I check out a file that has LF line endings in the
repository, they are not translated into CRLF line endings on my
machine.

Any ideas?

-- 
Matt
http://www.faradic.net/~mmcclure/

    "I don't believe in rivalries.  I don't believe in curses.  Wake
     up the damn Bambino, maybe I'll drill him in the (behind)."
        -Pedro Martinez _______________________________________________
Info-cvs mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/info-cvs




reply via email to

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