如何调整SVN设置以在Windows上转换行标题?

Ber*_*son 8 svn windows eol

我需要在Windows上使用SVN并且想要设置它,使得行结尾总是以Windows风格检出并始终以Unix风格提交,无论使用哪个存储库.

  1. 这是可能的还是我必须为每个仓库写一个配置文件?

    如果我必须为每个repo编写一个配置文件,我在哪里放置它,什么是正确的文件名,什么进入文件以及它对repo的其他用户有什么影响?

  2. 我对全局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
    
    Run Code Online (Sandbox Code Playgroud)

Dan*_*ger 12

您需要为存储库中的所有文件设置svn:eol-style属性native.Autoprops将为新添加到存储库的文件设置属性,但对于现有文件,您需要手动添加属性:

svn propset svn:eol-style native example.c
svn commit
Run Code Online (Sandbox Code Playgroud)