Re: Having a problem with pre-commit hook parameters
2008/10/21 David Moll <davermoll_at_gmail.com>:
> 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
> 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
> 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
> 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.
It should not matter. And I can't reproduce it here (creating local
repository with TSVN and all).
You may get more help asking on the general subversion mailing list
(users at subversion.tigris.org).
Milen A. Radev
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:35:51 CEST
This is an archived mail posted to the TortoiseSVN Users