Hi,
I'm trying to set up a pre-commit hook script in TortoiseSVN that will
only allow a commit if the comment matches a regex. Unfortunately I'm
not even getting to the point where I can test the script. Here's
what's happening. I grabbed the script posted on
http://www.anujgakhar.com/2008/02/14/how-to-force-comments-on-svn-commit/
and modified it so the findstr uses Windows pseudo-regex to look for a
certain string.
@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 err) else exit 0
:err
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
svnlook: Can't open file 'C:\DOCUME~1\dmoll\LOCALS~1\Temp\svn67.tmp
\format': The system cannot find the path specified.
My working copy is C:\Source\externalTest
The repository is at C:\SVN
I've looked at the four arguments passed into the script and none of
them would work with the svnlook log command. It seems like the path
passed in as the repository path should not be some temp file buried
in my local settings directory.
I did set the repository up using Tortoise, I don't know if that makes
a difference.
Thanks,
~Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-10-21 17:05:59 CEST