Different kinds of line endings in CVS?

I saw this in <http://boost.org/more/getting_started.html>: //========================================================================= Text file line endings in the .zip file are as supplied by each library developer. This works fine for Windows, but not for Unix/Linux. The tar.gz and .tar.bz2 files supply Unix/Linux friendly line endings. //========================================================================= I'm challenging the assertion that text-file line-endings should be developer-chosen. The archives are generated from a CVS export, right? I thought that CVS regulates all text files to have Unix-style line endings, and a CVS client will change a text file's line-endings upon check-in or -out from/to the appropriate character(s) for the client's platform. The developer would not have a choice. The only way around that would be if a text file was accidentally added to CVS in binary mode. However, storing a text file in binary mode unnecessarily has a large storage penalty. Check-outs and -ins also get messed up if a text file is in binary mode but the text editor is "smart" enough to clean up the difference (i.e. add extra line-break characters). If we have messed up text files like this, shouldn't we fix them up in the CVS repository? (Is that even possible?) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com

In article <BC9BBB6D.90D3%darylew@hotmail.com>, Daryle Walker <darylew@hotmail.com> wrote:
I thought that CVS regulates all text files to have Unix-style line endings, and a CVS client will change a text file's line-endings upon check-in or -out from/to the appropriate character(s) for the client's platform.
FWIW, CVS regulates (inasmuch as CVS regulates anything) that the client canonicalize text files before sending them, and the server sends the files to the client in a canonical form, as you thought. meeroh -- If this message helped you, consider buying an item from my wish list: <http://web.meeroh.org/wishlist>

On 4/9/04 7:34 PM, "Miro Jurisic" <macdev@meeroh.org> wrote:
In article <BC9BBB6D.90D3%darylew@hotmail.com>, Daryle Walker <darylew@hotmail.com> wrote:
I thought that CVS regulates all text files to have Unix-style line endings, and a CVS client will change a text file's line-endings upon check-in or -out from/to the appropriate character(s) for the client's platform.
FWIW, CVS regulates (inasmuch as CVS regulates anything) that the client canonicalize text files before sending them, and the server sends the files to the client in a canonical form, as you thought.
So, the initial CVS client has to convert the text file to UNIX format? And the server won't sanity-check this in either direction, which means a later client will apply the UNIX-to-native translation on a file that may not be in the UNIX format? The system would only work right if the uploading and downloading clients both correctly do UNIX translation, or if _both_ clients forget to do it _and_ they happen to share the same text format. (Actually, only the first case is working right, the second case is working wrong but getting away with it.) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com

In article <BC9F3B11.91AE%darylew@hotmail.com>, Daryle Walker <darylew@hotmail.com> wrote:
On 4/9/04 7:34 PM, "Miro Jurisic" <macdev@meeroh.org> wrote:
FWIW, CVS regulates (inasmuch as CVS regulates anything) that the client canonicalize text files before sending them, and the server sends the files to the client in a canonical form, as you thought.
So, the initial CVS client has to convert the text file to UNIX format? And the server won't sanity-check this in either direction, which means a later client will apply the UNIX-to-native translation on a file that may not be in the UNIX format?
I am not sure how you think you got into this state; if all clients perform newline conversion and the server is not buggy then the client will never perform UNIX-to-native conversion on a file that doesn't have UNIX newlines.
The system would only work right if the uploading and downloading clients both correctly do UNIX translation
Yes, the system does depend on that. meeroh -- If this message helped you, consider buying an item from my wish list: <http://web.meeroh.org/wishlist>
participants (2)
-
Daryle Walker
-
Miro Jurisic