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

Re: Server side script to prevent uncommented commits

From: Dominic Anello <danello_at_danky.com>
Date: 2005-03-29 21:45:01 CEST

On 2005-03-29 13:27:01 -0600, Bill Jackson wrote:
> I am trying to figure out how to write a server-side script that would
> prevent commits without a comment entry being made into the revision
> log. I have tried a couple of things but with no success. Any ideas
> what I can do?
>
> Thanks,
> Bill Jackson
>
> P.S. May I get the response directly CC'd to me also?

Here's what I use:

#!/bin/sh

umask 0002

repo=$1
txn=$2
svnlook="/usr/local/bin/svnlook"
grep="/bin/grep"

$svnlook log $repo -t $txn | $grep '[[:alnum:]]' >> /dev/null
err=$?

if [ $err -ne 0 ]; then
        echo -n "Empty commit message, aborting" 1>&2
        exit 1
fi

-- 
In the final reckoning there is only love, only that divinity. That we
are capable only of being what we are remains our unforgivable sin.

  • application/pgp-signature attachment: stored
Received on Tue Mar 29 21:47:36 2005

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.