CRLF issues on checkout (was Re: Gnucash 2.5/6 - jqplot)

Christian Stimming christian at cstimming.de
Sun Feb 24 04:46:37 EST 2013


Am Samstag, 23. Februar 2013, 18:23:13 schrieb Mike Alexander:
> > I think the easiest way out here (as long as we're still using SVN)
> > is to set  the per-file SVN property svn:eol-style to some fixed
> > value (here: LF). This  ensures the file get one canonical set of eol
> > markers.
> 
> Do you really want to use LF for eol-style for these file types?  I
> would think that "native" would work better.  That's what I've been
> using for years on various SVN projects and it seems to work well.  I
> don't work on Windows much anymore, but I used to and often worked on
> the same file on both systems.  "Native" is also what the stackoverflow
> article you mention suggests.  If you specify this eol format then the
> local file will be in the native format but the repository version will
> always be with LF line endings.

Yes, I do really want to set a deterministic eol-style instead of choosing the 
somewhat non-deterministic "native" style here. Think of it: We decide on one 
style, but with "native" you still say "well, depending on the OS you're 
looking at SVN, the files will end up this or that way." Not what I would call 
deterministic.

I have one specific use case where "native" really fails: Some co-workers and 
me regularly work with a dual-boot machine that runs either Linux or Windows, 
but uses a SVN checkout on the same partition. With eol-style=native, the 
files in the identical working copy end up differently depending on the last 
OS I've used to work with the working copy. In that (admittantly pecurliar) 
case, one specific eol-style (LF or CRLF) works but eol-style=native does not 
work.

On the other hand, there were times when eol-style=native was necessary: 
Earlier windows compilers would refuse to compile source code that did not 
have CRLF line endings. For Microsoft Visual Studio, this was no longer the 
case with at least MSVC 2005 (but I've encountered other cross-platform IDEs 
on windows that would still require CRLF line endings). If such a compiler is 
in the set of target platforms, then yes, using eol-style=native or CRLF is 
better.

But as this is not the case for our today's gnucash, we simply stick to LF and 
can be sure the files will look the same regardless which OS ran the checkout.

Regards,

Christian


> 
> For a discussion of the eol-style property see
> 
> <http://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.html
> #svn.advanced.props.special.eol-style>.
> 
>              Mike
> 
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


More information about the gnucash-devel mailing list