[Mono-list] A possible reason for getting newline problems
Martin Baulig
martin@gnome.org
06 Mar 2002 22:37:32 +0100
"Serge" <serge@wildwestsoftware.com> writes:
> > That's something different. Setting the CYGWIN environment variable to
> > include `binmode' (which you must do) controls the behavior of the
>
> But it seems, that CYGWIN=binmode doesn't override setup settings for
> cygdrive mount mode.
> So maybe that's the problem.
>
> For example try this:
> Unix mode selected in setup, mount reports binmode:
> Now cvs co mcs
> Array.cs - Unix-style line-ends.
> Attribute.cs - DOS-style line-ends.
> That's ok, it fetches files as they are.
Well, cygwin mount is yet another thing.
> So it looks like it's not a CVS internal conversion, but just due to
> fopen's default mode (that depends on mount mode) or something like that.
> Maybe CYGWIN var behavior depends upon Cygwin version?
No, these are two different problems:
* you are using the cygwin mount in textmode, so the cygwin "kernel"
will convert all files to windows line endings no matter what the
application does.
* I'm using the direct "mount" on the Windows operating system level
(via "NET USE X: \\TOWNSVILLE\einstein" in my logon script, which is
the same than doing "Extras / Connect Network Drive" in the NT
Explorer).
Here, the setting of the CYGWIN variable is important - when set to
binmode, it'll tell the Windows operating system to do the open in
binary mode.
The same applies if your local tree is on a local NTFS partition.
So you need to all three things:
a) set CYGWIN to include `binmode'
b) use `cvs checkout -kb' and `cvs update -kv'
c) use binmode in the cygwin mount
--
Martin Baulig
martin@gnome.org