info-cvs
[Top][All Lists]
Advanced

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

Re: problem with keywords and crlf


From: Laine Stump
Subject: Re: problem with keywords and crlf
Date: 22 May 2001 13:43:30 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

address@hidden (Larry Jones) writes:

> No.  CVS uses the "correct" line endings for the platform where it's
> running.

Not if the "platform" is a combination of different OSes and editors
used during different parts of the development process (which is the
case quite often these days).

(I've resisted the urge to put several arguments supporting explicit
line-ending handling in CVS here, as I just don't have the energy to
debate it; instead I'll patiently wait for Subversion to pass
Milestone 3, then try my luck convincing them instead...)

> It sounds like you checked the file out on Windows and then
> committed changes on Linux.

That isn't possible. If you have checked out on Windows, attempts to
run a Unix version of CVS on the work directory will fail completely,
since CVS gets confused by the CRLF in the administrative files in the
/CVS subdirectory.

A more likely happening would be that the file was originally created
with CRLF's and "cvs added" using the Linux cvs. The CRs in the lines
would be seen as just another character. If he then did a checkout on
Linux, made some modifications with an editor that understood CRLF
line endings, and did a commit from Linux, he would end up with a file
that had CRLF for most line endings, but LF-only for the $log stuff.

If all the files in the repository are text files, this can be solved
by closing down the repository for awhile and running a dos2unix
converter over every ,v file. "tr -d '\r\'" usually works decently, as
a part of an appropriate shell script.




reply via email to

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