info-cvs
[Top][All Lists]
Advanced

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

Re: Spaces added


From: Derek R. Price
Subject: Re: Spaces added
Date: Sun, 21 Jan 2001 04:37:05 -0500

Larry Jones wrote:

> David L. Martin writes:
> >
> > I think it is the responsibility of the CVS administrator to proclaim a
> > standard, canonical end-of-line format for ASCII files (either Unix
> > LF, Windows LF-CR, or even Mac LF), and enforce it to keep the
> > repository consistent.  Many editors now provide an option on what
> > kind of line feed to use  files.  Others do not, and use the
> > client-specific default
>
> No, the right thing to do is to always use the line ending conventions
> appropriate to your platform and *NEVER* share files between platforms.
> Although you can sort-of make it work on some of the most popular
> platforms, it's a recipe for disaster in general.

I think Larry was only commenting on not needing to worry about what EOL an
editor will use since CVS will convert ASCII files to use platform specific
EOLs, as long as working files aren't shared across platform, but I thought
I'd clarify for those that may have missed it:

The commitinfo script David described is still fairly safe and possibly a
good idea - if your server is on UNIX, the linefeed conversion will be run
before the commitinfo script gets run, so the commitinfo script can verify
that all lines end in '\n' safely.  The few exceptions might include things
like a test case input file which has one or more lines ending in '\r\n',
but I think a file like that would have caused problems between DOS/UNIX
anyhow and would have had to have been declared binary to CVS to keep it
identical on both platforms.

In other words, David's script should still catch the times someone binary
mode FTP'd the file from DOS and tried to check it in under UNIX.  :)

Derek

--
Derek Price                      CVS Solutions Architect ( http://CVSHome.org )
mailto:address@hidden     OpenAvenue ( http://OpenAvenue.com )
--
My homework was not stolen by a one-armed man.
My homework was not stolen by a one-armed man.
My homework was not stolen by a one-armed man...

          - Bart Simpson on chalkboard, _The Simpsons_






reply via email to

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