[Mono-list] CVS problem with line ends

Andrew Birkett andy@nobugs.org
09 Oct 2002 22:30:43 +0100


On Wed, 2002-10-09 at 12:58, spouliot@motus.com wrote:
> this is about configuration (that's why I used 2 different software) or the
> repository. Has anybody seen this before ?

Yes, this caused me all sorts of problem when I first started making
patches for mono.  The problem is that some files in the repository have
CR/LF endings.  The world only works if the repository files have LF
endings.

The CR/LF translation offered by WinCVS only works by converting LF to
CR/LF when you run "cvs checkout" and converting CR/LF to LF when you
run "cvs checkin".  So, when the repository file is CR/LF terminated,
the WinCVS conversion gives you CR/CR/LF endings!

If your patch file contains diffs for a mixture of CR/LF and LF-ended
files, then you'll end up getting very frustrated!

One way around this on windows is to use cygwin cvs exclusively.  I
develop almost exclusively on linux now, and also have CVS access so I
haven't suffered problems recently.

The best solution is for some brave soul to run a CR/LF->LF filter on a
checked-out tree and then commit the results.  That'll fix it once and
for all.  You'd need to use the --ignore-space-change with "cvs diff"
for those files if required for a wee while. But it's the Right Thing To
Do, I think.

Andrew