> 1. Are you sure the drive letter D: is defined for the user under
which the hook is running? I've heard that for Windows, drive letters
are a per-user thing.
Your absolutely right. I should have been smarter as I've had to deal
with this before.
> 2. You will want to use the pre-commit hook, not the start-commit
hook. By start-commit hook time, the transaction you want to examine has
not yet been created, but by pre-commit hook time, it has.
After fixed the above, I see what you mean. I moved the corrected code
into the pre-commit hook and things are working fine.
Thanks for your help.
Brian
-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2006d@ryandesign.com]
Sent: Thursday, December 14, 2006 12:18 PM
To: Brian Erickson
Cc: users@subversion.tigris.org
Subject: Re: Start-commit hook script
On Dec 14, 2006, at 08:57, Brian Erickson wrote:
> Right now, I'm trying to set it up so that no commits can happen to
> the tags branch of the respository. From what I've been able to
> figure out, what I need to do is use the svnlook command to see if
> anything is change in the tags folder. Is that the best way?
>
> So far, my batch file looks like this:
>
> @echo off
> Rem Start-commit hook
> Rem Make sure that commits are not done in tags...
> Rem %1 = repository path, %2 = User trying the commit
>
> set APRI_ICONV_PATH=D:\SubVersion\iconv
> set path=d:\SubVersion\bin
>
> echo %path% >&2
> echo '%1' '%2' '%3' '%4' '%5' '%6' '%7' '%8' '%9' >&2
> d:\SubVersion\bin\svnlook changed d:\svn\pcs >&2
>
> exit 1
>
>
> Commits always fail, so I know the script is running.
>
> The attempt to commit always produces the following:
>
> svn: Commit failed (details follow):
> svn: 'start-commit' hook failed with error output:
> d:\SubVersion\bin
> '//snidely/svn/pcs' 'erickson' '' '' '' '' '' '' ''
> The system cannot find the path specified.
>
> Notice, I'm not using any of the parameters to the script. I've got
> the path to the repository hard baked.
>
> If I manually clear out the environment and run the batch file by
> hand, it works fine.
1. Are you sure the drive letter D: is defined for the user under which
the hook is running? I've heard that for Windows, drive letters are a
per-user thing.
2. You will want to use the pre-commit hook, not the start-commit hook.
By start-commit hook time, the transaction you want to examine has not
yet been created, but by pre-commit hook time, it has.
--
To reply to the mailing list, please use your mailer's Reply To All
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 14 21:06:46 2006