info-cvs
[Top][All Lists]
Advanced

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

Re: CVS Windows OSX Cross Platform Double Spacing


From: Jim Hyslop
Subject: Re: CVS Windows OSX Cross Platform Double Spacing
Date: Wed, 11 Jan 2006 23:15:56 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Milstead wrote:
> I am developing on both Windows NT and OSX.
> When I check out files on the Mac OSX machine they come out double
> spaced. The repository is stored on a Linux machine and accessed over SSH.
The Windows client doesn't support SSH, does it? Which version are you
using for the Windows client ('cvs version').

> I thought that CVS was new line independent? That is stored files in the
> repository using unix style (\n) new lines and that the client handled
> the conversion.

That is correct. However, sometimes the concept of "the client" gets a
little blurred. One frequent cause of what you're seeing is to check out
the code using a Unix-like tool onto a Windows platform. You should
always try to checkout, edit and check in within one platform.

> It looks like this is not happening correctly. I am
> guessing that the Mac OSX client is checking out Windows line endings
> from the repository and replacing all the \r\n's with \n\n (i.e.
> replacing just the \r's).
No, on checkout clients never touch \r, only \n, which gets converted to
the client's line-ending convention.

> When I look in the repository using emacs in SSH I see lots of ^M's in
> the file. Are these put there by Windows?
(nit pick: Windows puts nothing there, it's the client software that
does it, but I digress)

Not likely. If the file was checked out using a Windows-like client, and
checked in using a UNIX-like client, then it would be the UNIX client
that assumed the \r was not part of the line ending, and checked it in.

> Has anyone got any advice. Could I search and replace all the new lines
> in the repository files to the unix standard (\n only) and then hope the
> clients work it all out?
Mark all the text files as binary ('cvs admin -kb'). On a Windows
machine, using a Windows CVS client which properly converts line
endings, and check them out. The \r\n combination will not be touched,
leaving proper line endings in the file. Then mark the files as text
(cvs admin -kkv) and check them in, and the client will convert the \r\n
combination back to \n.

Next step is to figure out how it happened in the first place, and make
sure it doesn't happen again.

- --
Jim Hyslop
Dreampossible: Better software. Simply.     http://www.dreampossible.ca
                 Consulting * Mentoring * Training in
    C/C++ * OOD * SW Development & Practices * Version Management
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDxdf8LdDyDwyJw+MRAg6pAKCunhP136ZfSY6KUiOlnQsRYnTX2QCgujk5
QDuNGq7hqB+mBmO0OqovY9w=
=pLSy
-----END PGP SIGNATURE-----





reply via email to

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