Hi David,
Thank you for the response!
I'd love to have a look at your script! Please do send me a copy.
Fu-Tung
--- On Sun, 9/7/08, David Weintraub <qazwart_at_gmail.com> wrote:
> From: David Weintraub <qazwart_at_gmail.com>
> Subject: Re: On commit, svn server to change line ending to unix style for .sh files.
> To: futung.cheng_at_yahoo.com
> Cc: users_at_subversion.tigris.org
> Date: Sunday, September 7, 2008, 2:52 AM
> Take a look at the "svn:eol-style" property. That
> allows you to
> specify the line ending for a particular file.
>
> If your goal is to make sure all files that end in *.sh
> must have this
> property, you'll need to write a pre-commit hook script
> that allows
> you to do this.
>
> I do have such a script written in Perl, and will be happy
> to send it
> to you if you'd like. It's part of a script that
> also verifies write
> authorizations, protects tags from changes, and even allows
> you to
> prevent people from creating files that contain invalid
> characters.
>
> By the way, the pre-commit hook script will prohibit a
> commit if a
> *.sh doesn't have the svn:eol-style property set to
> "LF", but won't
> automatically add the svn:eol-style property to the file.
> You can't
> really do this via server side. However, you can do this
> via the
> autoproperties in your config file. I setup a company wide
> config
> file, and after a few rejected commits, people are using
> it.
>
> Properties:
> <http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.advanced.props>
> Autoproperties Config:
> <http://svnbook.red-bean.com/en/1.4/svn.advanced.confarea.html#svn.advanced.confarea.opts.config>
>
> --
> David Weintraub
> qazwart_at_gmail.com
---------------------------------------------------------------------
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-08 17:45:20 CEST