Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Inconsistent line ending style" nightmare

I'm completely stuck with an SVN error when committing 2447 files at once. I'm using TortoiseSVN (latest version) on Windows 7 64 bits.

The fact is that some files were created on Mac, and others on PC, so TortoiseSVN stopped the commit with an annoying Inconsistent line ending style error.

In the beginning, to solve this problem, I manually opened the incriminated file in NetBeans, added one blank space, removed it and saved the file so NetBeans converted properly all line ending characters, but it seems there are more than "some files" incriminated.

like image 282
Epoc Avatar asked May 24 '13 08:05

Epoc


2 Answers

Under Windows 7, you can use Notepad++ v5.6.8 to convert EOL characters:

Menu EditEOL ConversionWindows / Unix / Mac

like image 194
Tuna Avatar answered Sep 16 '22 14:09

Tuna


In Notepad++, select menu ViewShow SymbolShow End of Line.

In the search box (Ctrl + F), select the Regular Expression search mode and search for the string:

[^\r]\n$

(translation: \n without a \r before it).

This will bring you directly the problem line(s) where you'll see the line ending with LF rather than with the pair CR-LF.

like image 44
Dror Harari Avatar answered Sep 18 '22 14:09

Dror Harari