我需要在 Windows 上使用 SVN,并希望将其设置为始终以 Windows 样式 check out 行结尾并始终以 Unix 样式提交,无论使用哪个存储库。
这是可能的还是我必须为每个 repo 编写一个配置文件?
如果我必须为每个 repo 写一个配置文件,我应该把它放在哪里,正确的文件名是什么,文件中包含什么,它会对 repo 的其他用户产生什么影响?
<我对全局 SVN 配置文件进行了以下更改,但没有效果。我还需要做什么?或者我是否必须使用一些特定参数调用 SVN 才能使更改在 Windows 上生效?
enable-auto-props = yes [auto-props] *.c = svn:eol-style=native *.cpp = svn:eol-style=native *.cxx = svn:eol-style=native *.h = svn:eol-style=native *.hpp = svn:eol-style=native *.hxx = svn:eol-style=native *.txt = svn:eol-style=native *.tex = svn:eol-style=native *.bib = svn:eol-style=native
最佳答案
您需要为存储库中的所有文件将 svn:eol-style
属性设置为 native
。 Autoprops 将为新添加到存储库的文件设置属性,但对于现有文件,您需要手动添加属性:
svn propset svn:eol-style native example.c
svn commit
关于windows - 如何调整 SVN 设置以在 Windows 上转换行尾?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10164132/