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

Re: Pre-commit scripts to enforce commit message and make tags read-only

From: Blair Zajac <blair_at_orcaware.com>
Date: Sat, 26 Apr 2008 21:55:45 -0700

Ryan Schmidt wrote:
> On Apr 26, 2008, at 7:38 PM, Douglas Bullard wrote:
>> I've been trying to find a pre-commit script that both requires all
>> commits to have messages, and also prevents commits to tags.
>> I've found scripts that do one or the other. A lot seem to be in
>> python (which none of our staff really knows), is that the most common
>> language?
> Write a pre-commit script in whatever language you like which calls
> first the one script (e.g. to check the log message), then the other (to
> prevent commits to tags).

The default pre-commit script already has the check for commit messages:

$ cat pre-commit.tmpl
# Make sure that the log message contains some text.
$SVNLOOK log -t "$TXN" "$REPOS" | \
    grep "[a-zA-Z0-9]" > /dev/null || exit 1


Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
Subversion training, consulting and support
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-04-27 06:56:16 CEST

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