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

Re: Require comments/messages on commit

From: Peter McNab <mcnab_p_at_melbpc.org.au>
Date: 2005-05-07 03:47:40 CEST

Gregory Piņero wrote:

>I'm still stuck on this. I renamed pre-commit.tmpl to pre-commit.bat
>and I replaced the contents with the two lines:
>
>echo "pre-commit.bat"
>pause
>
>I just want to see that the batch script is triggered. But when I
>check something in, nothing seems to happen. Any ideas?
>
>Thanks,
>
>Greg
>
>
>
>
Greg
The following batch file prevents commits without comments and logs the
attempts and successes to a file.

@echo off
rem Add path to Subversion executable
set path=%path%;c:\Program Files\Subversion\bin
rem Add path to grep.exe
set path=%path%;c:\Program Files\Borland\Delphi7\Bin
Date /T >> D:\pre-commit.log
Time /T >> D:\pre-commit.log
echo %CMDCMDLINE% >> D:\pre-commit.log
SVNLOOK.exe log -t "%2" "%1" | grep.exe "[a-zA-Z0-9]" > nul || exit 1
echo Commit Permitted >> D:\pre-commit.log
exit 0

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat May 7 03:49:59 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.