Thanks. Actually, that did not work. The reason why I put those
characters in there was because I thought it was needed to escape the
space. In your script, it looks like you are not calling it
pre-commit.cmd. Does that matter?
-----Original Message-----
From: Nathan Kidd [mailto:nathan-svn@spicycrypto.ca]
Sent: Tuesday, November 14, 2006 5:53 PM
To: users@subversion.tigris.org
Cc: Morgovsky, Alexander (US - Glen Mills)
Subject: Re: Pre-commit script for Windows - Require log msg
[Please correspond using the users@subversion.tigris.org list.]
amorgovsky@deloitte.com wrote:
> Hi. I am getting the following when trying to run it.
>
> Commit failed
>
> MERGE request failed on '....' The filename, directory name, or
> volume label syntax is incorrect.
>
> Then, I see your message about the commit being not allowed. Now,
> here is a part of your script, and I modified the SVNLOOK part. I am
> not sure what is wrong, I appreciate any help in advance. Thanks.
>
> set "REPOS=%~1" set "TXN=%~2"
>
> set SVNLOOK="\"C:\\Program Files\\Subversion\\bin\\svnlook.exe\"";
It cannot work like that. Did you copy the setting from a perl script?
All those quotes and backslashes are not interpreted in a batch script.
Instead try:
set SVNLOOK="C:\Program Files\Subversion\bin\svnlook.exe"
-Nathan
> Nathan Kidd wrote:
>> Young, Jason (GE Infrastructure) wrote:
>>> Does anyone have a pre-commit script for Windows that requires a
>>> log message to be entered? I know about the one included with
>>> subversion, but I would like something that runs direct if
>>> possible.
>> Try the attached. (You'll need to set %SVNLOOK%. (I actually use a
>> variant of this, with grep, which allows easy checking things like
>> a single space.)
>>
>>> For that matter, is there a site that has a collection of hook
>>> scripts for Windows?
>> I don't know of any, but I'm sitting on a number of patches for
>> mailer.py and case-insensitive.py, making them work properly on
>> win32 and with 1.2.x python bindings. I don't have time right now
>> to submit proper patches to dev@ but if you're interested I can
>> post the full versions somewhere.
>>
>> -Nathan
>>
>>
>> @echo off :: :: check-empty-log.cmd - Stops commits that have empty
>> log messages. ::
>>
>> setlocal
>>
>> set "REPOS=%~1" set "TXN=%~2"
>>
>> :: Make sure that the log message contains some text. for /f
>> "tokens=*" %%i in ('%SVNLOOK% log -t "%TXN%" "%REPOS%"') do set
>> "LOGMSG=%%i" if not "%LOGMSG%"=="" 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, Your Loving Admins. 1>&2 exit 1
This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message.
Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 15 20:33:28 2006