[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: line ending conversions
From: |
Peter Ring |
Subject: |
RE: line ending conversions |
Date: |
Tue, 9 Oct 2001 22:43:42 +0200 |
If the problem is that you need CR/LF for files in a Windows hosted
sandbox, but only LF when those files are checked out in a *nix
hosted sandbox, you need the CR/LF to LF translation. The binary from
the cvshome site will do it, http://ftp.cvshome.org/win32/cvs1-11.zip.
There will probably be some issues with the administrative files in
the sandbox if you just switch; be prepared to check out a new sandbox.
If you do not need CR/LF in your Windows sandbox, or if you don't
mind CR/LF in non-Windows sandboxes, you can just stick with the
Cygwin port of cvs. The CRs will be preserved, as you have observed,
and will appear in non-Windows sandboxes. You might not need the
CRs though; NTemacs does fine without, and can be set up to default
to *nix-style line endings.
On Windows, I use the Cygwin ports of cvs etc. together with emacs and
PCL-CVS. All mounts are binary and I'm happy as can be. Files that
absolutely must have CR/LF tend to be specific for Windows applications
anyway, i.e., they are of no use to applications on any other OS.
Kind regards
Peter Ring
-----Original Message-----
From: address@hidden [mailto:address@hidden Behalf Of
Matt McClure
Sent: 9. oktober 2001 19:11
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