SVN Line ending Style

自古美人都是妖i 提交于 2019-12-05 23:56:14

问题


When i try to commit the file in SVN its showing error as "Commit failed".Details follow....commit svn: Inconsistent line ending style.


回答1:


Check your svn properties on the directory / files. If you have svn:eol-style defined, but your file contains different styles (Unix vs DOS) the commit will fail, since SVN doesn't know which to convert to.

Reference: http://svn.haxx.se/users/archive-2006-07/0702.shtml




回答2:


Once you're aware of the line ending style svn expects, most modern editors will have options to convert your source completely to one style or another. You can also run regular expressions to detect and alter them (I like Perl for this).

MSDOS EOL: "\r\n"

UNIX EOL: "\n"




回答3:


Check the EOLs in commit message itself: If you pass a commit message from file with the --file switch, make sure the EOL style in the commit message is consistent (all DOS or all UNIX).




回答4:


for followers, here's how to manually set the prop to one or the other:

 svn propset svn:eol-style LF path/to/filename



回答5:


select line end style form your tool(like kdiff) itself...right side bottom(just above the output lines)




回答6:


I'm using TortoiseSVN in a Windows environment. I got this same error when trying to commit project files, presumably written in Linux (an AVR32 project). I was able to get around this problem simply by opening each file in Microsoft Visual Studio, at which point VS prompted me to normalize the line endings. Choosing to do so caused Tortoise to stop complaining.



来源:https://stackoverflow.com/questions/857991/svn-line-ending-style

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!