This is kind of old ground. :)

For a Windows .BAT / .CMD file when checked out on Unix, LF is more
pragmatic as an EOL marker (as you might want to edit the text, but are not
going to execute the script). The same logic applies for a shell script
checked out on Windows (where CR LF as EOL is useful).

Turn this around. Text files are most useful checked out as text files -
whatever the platform.

(Went through this with CVS, Subversion, and Mercurial. The implementation
varies, but you want pretty much the same end result, when working
cross-platform.)


On Sat, Jan 16, 2010 at 5:26 AM, sebb <seb...@gmail.com> wrote:

> Suggestion for handling LF/CRLF EOL conversions.
>
> Some files always need to have the same EOL, for example Windows .BAT
> and .CMD  files always need CRLF. AFAIK, shell scripts always need LF.
>
> For such files, set the appropriate svn:eol-style property, so
> checkouts will always have the correct EOL. Yes, this may make
> editting the files a bit awkward for some - tough.
>
> For files that need to vary between releases - for example README.txt
> - you can use an Ant patternset to process them. You can even check
> whether the target archive is for the same EOL-style as the host, and
> skip conversion for such cases.
>
> Just a thought.
>

Reply via email to