From: Martin K. <mar...@gm...> - 2011-10-06 19:48:36
|
On 10/06/2011 08:35 PM, David Gilbert wrote: --%<-- >>> Hi David, >>> >>> in this commit you've changed EOL style from "Unix-style" (LF) to >>> "Windows-style" (CR+LF) which makes the patch itself hard to read. >> I didn't notice this at first because I only had a look via viewvc on >> sourceforge, which uses colored diff by default, which seems to ignore >> whitespaces. >> >>> The question is - what are the rules for JFreeChart code-base wrt. EOLs? >>> There seems to be mix of both EOL styles among code base now. It would >>> be nice if all developers use the same style so the commits like this >>> one would be prevented (or at least considered harmful). >>> >>> I think that generally just LF (Unix-style) is the right choice. What do >>> you think? >> +1 from me. >> >> - martin >> > > Hi, > > I agree too! I'm using a Windows machine right now, and didn't notice > the end-of-line change (because TortoiseSVN ignores whitespace changes > by default). I'll try to be more careful. Hi, I see you've just fixed the ant script (r2276). To find the all files you might run something like (I fought with similar issue in company SVN): find -type f | egrep -v "\/\.svn\/|\/build\/" | xargs file | grep CRLF | cut -d : -f 1 Then I usually 'xargs' it to gvim where I run macro with ":set ff=unix" on all opened files and commit (likely there is such a command in Linux) Here are some resources which helps to handle this issue: - http://www.mediawiki.org/wiki/Subversion/auto-props - http://stackoverflow.com/questions/15687/how-can-i-convert-all-line-endings-to-crlf-lf-or-cr-during-svn-operations - http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5 I'm not sure whether there is possibility of some server-side hook. I think that not and that it's rather on individual developers. Cheers, m. |