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

Re: Prevent empty commit log message

From: Adrian Hoe <mailbox_at_adrianhoe.com>
Date: 2005-07-28 17:57:48 CEST

On Jul 28, 2005, at 8:22 PM, Olivier Sannier wrote:

> CÚlio Cidral Junior wrote:
>> Hello!
>> What and how could I do to prevent users from giving an empty log
>> message before commit a new revision?
>> Thanks!
> Use a pre-commit hook that tests the length of the log message.
> There are numerous examples out there.

My pre-commit hook script failed:

Sending README
Transmitting file data .svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:

My access privileges are:

-rwxr-xr-x 1 adrian users 2933 2005-07-28 23:34 pre-commit

I'm using the hooks template that comes with 1.2.0.


# Long comments omitted


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

# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg ||
exit 1

# All checks passed, so allow the commit.
exit 0

What's wrong with it?


"If you missed the rising sun and the morning dew, don't miss the  
beautiful sunset." -- Adrian Hoe inspired by Michal Nowak, June 15 2004
Received on Thu Jul 28 18:03:43 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.