[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: On commit, svn server to change line ending to unix style for .sh files.

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Fri, 5 Sep 2008 19:32:13 -0500

On Sep 5, 2008, at 12:54 PM, Fu-Tung Cheng wrote:

> The scenario I have is that I always want .sh files - any other
> files - to have the unix eol style but I never want to have to set
> them. svn should be smart enough or configurable enough to set
> this without any interaction from my or any other clients behalf.
> So the question remains, is this feature on the roadmap? Why
> should everytime I want to add a new .sh file to the repository I
> need to manually set the eol:style to CR when the server could say
> "hey that's a .sh file I know what style he wants and just set it".
> I realize that adding files doesn't occur all the time and that
> some client allow you to select a bunch of files and set all their
> eol:style at once but this is still error prone and much less nice
> than an automated server side setting.

Note: it's "svn:eol-style", not "eol:style", and you want to set it
to LF (Unix- and Mac OS X-style line endings), not CR (old Mac-style
line endings).

There is no server-side mechanism to set these properties for you.
The best you can do is to set up your clients properly, and install a
pre-commit hook to reject any commit that does not meet your
requirements. In the error message that such a hook prints, you can
inform the user how to set up their client properly.

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-06 02:33:15 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.