Newline problems with Subversion

当一个文件在*nix和Windows下多次操作后,可能混合了2种断行格式,在导入包含此种文件的项目时,常出现以下错误:File '/home/pal/workspace/proobox/build.xml' has inconsistent newlines,解决的办法就是去掉相关文件的svn:eol-style : native属性,也可以直接修改svn的客户端配置文件,修改全局属性,以便提交新文件时也能不受此问题影响。(即修改[auto-props]内相应内容,去掉svn:eol-style : native的设置)

单个文件属性修改详见以下办法:

Newline problems with Subversion

On my current project, developers work from Linux and Windows together, and we ran into the following problem when trying to commit from Eclipse:

Commit failed (details follow): svn: File '/home/pal/workspace/proobox/build.xml' has inconsistent newlines

Well, someone else already had this problem, and the solution was to remove the keyword svn:eol-style from the file in Subversion.

In Eclipse, select Team/Show Keywords and remove the keyword, in command prompt:

$ svn proplist -v build.xml
Properties on 'build.xml':
svn:keywords : author date id revision
svn:eol-style : native
	
$ svn propdel svn:eol-style build.xml
property 'svn:eol-style' deleted from 'build.xml'.

Your now ready to commit, and problem is solved!

你可能感兴趣的:(eclipse,xml,linux,SVN,subversion)