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

Re: pre-commit hooks does not show any output

From: Mathias Weinert <mathias.weinert_at_gfa-net.de>
Date: 2005-10-27 15:43:59 CEST

Claudio Ochoa <claudio@fi.upm.es> wrote:

> Damn! forget about my message, there was nothing wrong with the pl
> scritp. I used the pre-commit template and I didn't see these lines
>
> # Make sure that the log message contains some text.
> SVNLOOK=/usr/bin/svnlook
> $SVNLOOK log -t "$TXN" "$REPOS" | \
> grep "[a-zA-Z0-9]" > /dev/null || exit 1
>
> and of course, my commit was with an empty message, so never reached the
> access control.

Perhaps the script should be changed that it will tell
you about an empty log message, e. g. like this:

--- pre-commit.tmpl 2005-10-20 16:13:57.784377800 +0200
+++ pre-commit 2005-10-27 15:40:01.295230300 +0200
@@ -59,8 +59,14 @@

 # Make sure that the log message contains some text.
 SVNLOOK=/usr/local/bin/svnlook
+SVNLOOKOK=1
 $SVNLOOK log -t "$TXN" "$REPOS" | \
- grep "[a-zA-Z0-9]" > /dev/null || exit 1
+ grep "[a-zA-Z0-9]" > /dev/null || SVNLOOKOK=0
+
+if [ $SVNLOOKOK = 0 ]; then
+ echo Empty log messages are not allowed. Please provide a proper log message. >&2
+ exit 1
+fi

 # Check that the author of this commit has the rights to perform
 # the commit on the files and directories being modified.

>
> Sorry about that!
>

No problem.

> Thanks anyway for your help!

You're welcome.

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 27 15:49:10 2005

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

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