[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: Frank Gruman <fgatwork_at_verizon.net>
Date: 2005-07-28 18:11:55 CEST

Just a thought since it seems you just grabbed the default and renamed it...

Did you also make sure you either 1) have permission to
commit-access-control.pl, or 2) edit the pre-commit and remove that line?

Since your only request is to make sure the log is not empty, I'd at
least comment it out (not remove because you may want it someday), and
then give it a whirl.

Regards,
Frank

Adrian Hoe wrote:

> 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.
>
> ----------------------------------------------------------------------------------------------------
> #!/bin/sh
>
> # Long comments omitted
>
> REPOS="$1"
> TXN="$2"
>
> # 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
>
> # 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?
>
> TIA
> --
> "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
> http://adrianhoe.com
>
>
Received on Thu Jul 28 18:16:20 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.