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

Re: Start-commit hook script

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-12-14 18:18:18 CET

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
Received on Thu Dec 14 18:19:49 2006

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.