So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you’re looking at 1,000s of files spanning dozens of folders of different depths.
What do you do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think the pre-commit hook can actually change the data that is being committed – it can disallow a commit, but I don’t think it can do the conversion for you.
It sounds like you want the property ‘svn:eol-style’ set to ‘native’ – this will automatically convert newlines to whatever is used on your platform (use ‘CRLF’, ‘CR’ or ‘LF’ to get those regardless of what the OS wants).
You can use auto-properties so that all future files you create will have this property set (auto props are handled client-side, so you’d have to set this up for each user).