This is the mail archive of the
mailing list for the Cygwin project.
RE: can Cygwin CVS change line endings on checkout/update?
- From: "ASH, JAMES (SBCSI)" <ja7295 at sbc dot com>
- To: dmkarr at earthlink dot net, cygwin at cygwin dot com
- Date: Sun, 22 Sep 2002 22:01:30 -0500
- Subject: RE: can Cygwin CVS change line endings on checkout/update?
First of all, you should always make efforts to be sure that your CVS files
are stored using the *UNIX* line ending conventions, whether you are using a
client on DOS/Windows or not, whether your CVS server is running on
DOS/Windows or Unix. If you do not, you *will* have trouble with diffs, and
CVS may tell you a file is out of date when it is not.
Second, the Cygwin CVS (as I believe the "stock" CVS) is aware of line
endings and what to do with them. In a nutshell, a Windows client will
convert the endings before commiting to CVS.
If you are using a DOS text mount on your client machine, and your files
contain DOS CR/LF endings, the client will convert the line endings to UNIX
for you when you commit, and convert back to CR/LF when you checkout/update.
It is smart this way.
If you are using a binary mount on your client machine, the CVS client will
*NOT* do any conversion. It will assume that you are already using Unix line
endings (because you have a binary mount) and will leave them as is. This
will lead to CR/LF in your repository (which you do not want).
In our shop, the recommendation is to use DOS text mounts on your client
machine so that the line endings are handled properly by CVS on checkout and
We make this recommendation because, if you use binary mounts, and happen to
save something using a Windows editor, or any Windows IDE, that editor will
save your local files with DOS endings. When you commit, CVS will not
convert endings because of the binary mounts. You end up with CR/LF in your
repository, and this can cause false diffs.
Sorry to ramble. Hope this helps.
From: email@example.com [mailto:firstname.lastname@example.org]
Sent: Saturday, September 21, 2002 10:21 PM
Subject: can Cygwin CVS change line endings on checkout/update?
I've noticed that WinCVS has a feature where it can change the line endings
files on checkout/update, to either use DOS or Unix line endings. I don't
anything in the Cygwin CVS interface that can do this. Is this feature just
not in standard command-line CVS?
David M. Karr ; Java/J2EE/XML/Unix/C++
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html