Inconsistent line ending style upon Subversion Import / Commit

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: [plain] *.xml = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Date Revision[/plain]

Here’s my solution (svn config file): [plain] [auto-props] *.xml = svn:mime-type=text/xml;svn:eol-style=CRLF;svn:keywords=Date Revision [/plain]

[plain] [miscellany] enable-auto-props = yes [/plain]

Hopefully this helps you out as well.

kick it on DotNetKicks.com

Leave a Reply