svn: Inconsistent line ending style

Today I got this error on OSX terminal doing a "svn import" of a project created with a maven archetype.
My svn configuration defines that when I commit Java or XML sources it automatically adds the property svn:eol-style=native (see: svn automatic properties). But the project created with maven is mixing different type of end of lines, so svn fails when importing or committing. To solve this I converted the end of lines of every source file in unix format '\n'. Unix has a convenient utility that is called dos2unix that obviously is not available by default on OSX, so you have to install it manually with macports:

$ sudo port install dos2unix

Then, I ran following command to convert everything to unix-style end of lines:

$ find my-project-folder -name "*" -type f | xargs dos2unix

This will change every single file (in my case all the files were source code, then text files) using '\n' as line separator.

Then my 'svn import' ran successfully with no errors.


No Responses to “svn: Inconsistent line ending style”  

  1. No Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



Calendar

May 2009
M T W T F S S
« Apr   Jun »
 123
45678910
11121314151617
18192021222324
25262728293031

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening