This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CVS and CR, LF

Charles Wilson wrote:

> Christopher Faylor wrote:
> > On Mon, Dec 24, 2001 at 08:46:23PM -0800, David Koski wrote:
> >
> >>You are correct about the mount points.  I mounted in binary mode, then used
> >>in bash and it now works correctly.  Setting CYGWIN=binmode did not have the
> >>same effect.
> >>
> >
> > Nor should it.  CYGWIN=binmode does not affect files when the files can be
> > via a mount point.
> Hmmm...I suppose this all means that I missed an open() or fopen() call
> somewhere in gdbm or cvs, and it needs to have the appropriate
> "O_BINARY" or "b" added.

Or perhaps one "b" too many somewhere?

>  However, I'm nervous about making that sort of
> change even if I DO find one -- wouldn't that mess up folks who are
> happily using cvs with local working dirs on textmode mounts?  Or is
> that a non-existent class of users, and everybody using cvs is also
> using binary mode mounts?

I use cvs heavily and also text mounts.  I am.  Well, at least I think therefore
I am. ;-)

> Can anybody who uses text mode local mounts birddog this for me?

Overall CVS works very well for me.  The only problem I've been having, and I
just noticed it recently, is with "cvs diff", and I can't yet pin it on the
"CRLF!=LF!=CR!=LFCR and sometimes CTRL-Z" plague.  Here's a few experiemnts I've
run, previously posted in cygwin-patches; all textmounts, no CYGWIN=:

Experiment 1:
- mv my altered, indented "window.h" to "window.h.temp".  A hex editor shows it
to have the correct CRLF line endings (i.e. no extra CRs or something like
- do a clean checkout of cvs's window.h.  The file on my system also shows
correct CRLF line ends.
- A "cvs diff" on the clean, just-checked-out source shows no differences.
- Do a "diff window.h window.h.temp" (not "cvs diff").  Shows only the actual
changes, not the entire file as being different.
- Replace the unaltered "window.h" with my "window.h.temp", and the "cvs
diff -pu" shows every line of the file to be different.
- Run "d2u" on my local "window.h", which is now the altered one.  "cvs
diff -pu" *still* shows every line to be different!  (so does a plain "cvs
diff", no -pu).

Experiment 2:
- Take a clean window.h, mv it to a new name, indent.
- Recheck out a clean window.h.
- Both show the same valid CRLF line endings.
- "cvs diff", every line is different.  "diff", nothing is different (even
though two lines are in fact indented differently - I thought you had to
"diff -b" to ignore WS changes?).

So I guess I'm out of WAGes now, unless cvs is tracking the file-moving and
claiming that a file with, say, the same contents but a different creation date
or something is completely different, regardless of contents.  But I don't think
that would explain the initial problem because I never moved any files.

Gary R. Van Sickle
Brewer.  Patriot.

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]