I need to use SVN on Windows and would like to set it up such that line endings are always checked out in Windows style and always committed in Unix style, regardless which repository is used.
Is this possible or will I have to write a configuration file for each repo?
If I have to write a config file to each repo, where do I put it, what's the right filename, what goes into the file and what effect will it have on other users of the repo?
I made the following changes to the global SVN config file but it had no effect. What else do I need to do? Or will I have to call SVN with some specific parameters for changes to take effect on 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
You need to set the svn:eol-style
property to native
for all files in the repository. Autoprops will set the property for files newly added to a repository, but for existing files, you need to add the property manually:
svn propset svn:eol-style native example.c
svn commit