geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject Re: CR/LF cleansing
Date Sun, 31 Aug 2003 17:58:57 GMT
Daniel,

	There another angle to this that I think you're missing.  If a
Windows user submits a zip file patch and a Linux committer applies it,
the line endings are still likely to come out screwy despite having a
properly configured CVS client.  The CVS client on Linux assumes your
files have UNIX line endings, and if they don't, I think you get extra
junk in there when someone checks out on Windows.  Of course, there are
tools for this (dos2unix and so on), but you have to notice the problem
first.  The reverse (Linux user, Windows committer) is probably also a 
problem.

Aaron

On Sun, 31 Aug 2003, Daniel S. Haischt wrote:
> Jason Dillon wrote:
> 
> [...]
> 
> > 
> > 
> > It is not just a client issue.  Patches that come in have bunk line 
> > endings too.
> > 
> 
> i consider this a client _only_ issue, presuming the statement ...
> 
>   Developer.getCurrentCVSClient().equals(CygwinCVSClient);
> 
> evaluates to true. why am i stating that?
> 
> quote [1]:
> 
>   'I suspect this is because the CVS cygwin client has no idea
>   it's running on Windows'
> 
> if the above statement is true and a developer creates a diff
> for example according to the CVS Book [2] using ...
> 
>   cvs diff -u [file to be patched]
> 
> she, the developer, will use the Cygwin cvs binary which
> thinks that ASCII files are stored with UNIX LF line endings
> but actually all drives are mounted in binary mode or vice
> versa (ASCII files are asumed to have DOS CRLF but all drives
> are mounted in text mode).
> 
> so the essential point of the above statements is that if the
> client is not configured accordingly, it will always mess up
> files - no matter whether someone did a 'cvs commit' or 'cvs
> diff'.
> 
> regards
> 
> daniel s. haischt
> --
> 
> references:
> 
> [1]: http://www.dehora.net/journal/archives/000330.html
> [2]: http://cvsbook.red-bean.com/cvsbook.html#diff
> 
> 
> 
> 


Mime
View raw message