12

Is there a best practice for preventing mixed eol-styles in a subversion repository.

I know that svn:eol-style=native can be set as an auto-prop, but I would have to ensure that it was set for all committers. I'm also reluctant to do a retrospective, repository-wide change of svn:eol-style if there is a less invasive solution.

hippietrail
  • 15,848
  • 18
  • 99
  • 158
Ken
  • 77,016
  • 30
  • 84
  • 101

2 Answers2

6

Note that as of SVN 1.8 you can set up auto-props for entire trees within your repository (including at the top level), which finally fixes this issue independent of client-side config.

See the following for more details:

Alastair Maw
  • 5,373
  • 1
  • 38
  • 50
5

You should use pre-commit hooks on server-side.

Here is a hook you need: http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/check-mime-type.pl

This hook will enforce users to set correct eol-style.

See svn documentation on how to use them.

Also, you can implement your own hook which will set eol-style automatically.

uthark
  • 5,333
  • 2
  • 43
  • 59
  • Thanks uthark - I suspected that hooks were the answer. I'd hoped for something else since the repository isn't hosted by me but at least I'm off in the right direction – Ken Mar 25 '10 at 09:08