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

Re: Restrict the commit operation with pre-commit hook

From: David Weintraub <qazwart_at_gmail.com>
Date: Tue, 10 Nov 2009 16:20:34 -0500

You can try the script I use which is in Perl. You can download it
from <http://dl.dropbox.com/u/433257/hooks.zip>. It requires Perl
which is on all Unix, LInux, and Mac OS X boxes, and is available for
Windows at http://activestate.com.

You will need the Config:IniFiles module from CPAN:
<http://search.cpan.org/~shlomif/Config-IniFiles-2.52/lib/Config/IniFiles.pm>

This hook can do many things:

1). It is a write permission hook. You can specify who has permission
to commit what files. You can even create groups and give groups
permission.
2). You can specify a directory as "add only". That is, you can add
stuff to it, but you cannot edit anything in it. This is good for
tags. You can create tags, but you are not allowed to edit files in a
tag.
3). You can specify properties that certain files must have, and the
value of those properties. For example, we require all *.sh files to
have svn:eol-style set to "LF".
4). You can ban certain file names based upon regular expressions. For
example, if you use Windows, you cannot have a file named aux.*.
5). Last, but not least, you can specify a regular expression for
commits. For example, we require a defect id, or the word NONE at the
beginning of each commit message.

It's offered under the BMAB license which requires you to buy me a
beer if you happen to be in town.

On Tue, Nov 10, 2009 at 2:11 AM, S Prabhu <sprabhu_at_emmeskay.com> wrote:
> Hi,
>
> I want to restrict the commit operation when the log(Commit) message empty
> or characters count is less than 25.
> I know, we can do this with the help of pre-commit hook. But, I don't know
> how to create the pre-commit hook scripts. Can some one help to write script
> or give me the some sample scripts which does very similar work.
>
> Thanks
> S Prabhu
> --
> View this message in context: http://old.nabble.com/Restrict-the-commit-operation-with-pre-commit-hook-tp26279200p26279200.html
> Sent from the Subversion Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2416028
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
>

-- 
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2416285
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-11-10 22:21:29 CET

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.