If you are using linux as SVN server it comes already with a working
example (I think it was called pre-commit.py). If you are using
windows you can use the following code:
(You have just to name it pre-commit.bat and placre it in the hooks folder)
@echo off
::
:: Stops commits that have empty log messages.
::
@echo off
setlocal
rem Subversion sends through the path to the repository and transaction id
set REPOS=%1
set TXN=%2
rem check for an empty log message
svnlook log %REPOS% -t %TXN% | findstr . > nul
if %errorlevel% gtr 0 (goto err0)
svnlook log %REPOS% -t %TXN% | findstr /R ........... > nul
if %errorlevel% gtr 0 (goto err1) else exit 0
:err0
echo. 1>&2
echo Your commit has been blocked because you didn't give any log
message 1>&2
echo Please write a log message describing the purpose of your
changes and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
:err1
echo. 1>&2
echo Your commit has been blocked because your hadn't the minimum
log message size (10 chars) 1>&2
echo Please write a log message describing the purpose of your
changes and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
On Mon, May 26, 2008 at 3:30 PM, Andy Levy <andy.levy_at_gmail.com> wrote:
> On Mon, May 26, 2008 at 9:21 AM, <marcos.martins_at_indt.org.br> wrote:
>> Hello guys,
>>
>> Is there any configuration that force message in commits?
>
> You need a pre-commit hook script on the server which rejects any
> commit with no log message.
>
> You can also use tsvn:minlogsize BUT that will only be checked by
> TortoiseSVN and can be easily subverted by a user.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
> For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-05-26 15:47:42 CEST