On Mon, Jul 19, 2010 at 11:10 PM, Kitching, Simon
> On Wed, 2010-07-14 at 10:35 -0400, David Weintraub wrote:
>> I have a pre-commit hook that will verify that particular files have
>> svn:eol-style set before allowing a commit. This way, you can make
>> sure that the property is set before anyone can do a commit.
> Yes, that might be the best way to prevent the problem reoccurring in
> the future. Unfortunately, it doesn't help with fixing a pre-existing
> repository (ie setting eol:style=native on existing files that really
> should have had it set when they were created but didn't).
Here's a solution you haven't considered: Force all text files to have
"svn:eol-style" set to "CRLF" instead of "native".
I've found that Windows tends to be the system that messes up line
endings. Many developers will open up Notepad or Wordpad which will
muck up line endings if the file doesn't already have Windows style
line endings. However, Linux/Unix users tend to use tools like
Eclipse, VIM, or Emacs which will not mess with the line endings of
files that it is editing. If a file has "CRLF", these editors wont'
These Unix/Linux tools can also be configured to default to Windows'
CRLF on new files too.
Then, you simply need a hook to enforce the use of Windows line
endings on all text files (except maybe Unix specific files like Shell
scripts and Makefiles which fail if they have CRLF line endings).
Received on 2010-07-21 02:44:51 CEST