Inconsistent line ending style upon Subversion Import / Commit

Written by Brett Veenstra

For posterity and my future sanity (and hopefully this helps the rest of us SVN-crazy developers).

When doing IMPORT or COMMIT operations using Subversion, we can receive a message like “Inconsistent line ending style”.

Particularly when IMPORTING, this can be a frustrating occurrence, with a host of hints provided online, but I couldn’t find anything but “brute force” approaches of converting EOL symbols by touching each file.

I use [auto-props] in my svn config file, and this is both part of the problem and the ultimate solution.

The latest occurrence happened when IMPORTING several XML files into a Repository. The confusing part is many of the XML files reported success, and then SVN hit an XML file with a different EOL style than all the others.

My auto-props entry used to be:

 *.xml = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Date Revision

Here’s my solution (svn config file):

*.xml = svn:mime-type=text/xml;svn:eol-style=CRLF;svn:keywords=Date Revision

enable-auto-props = yes

Hopefully this helps you out as well.