You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Merijn Boom <m....@mhjboom.nl> on 2006/05/27 17:14:28 UTC
Hook Script error
Hi,
Based on the svn-shadow.pl script I wrote an addition to copy files over
windows shares (I have to add SSH as well). When I run the perl script
manually it works fine. As soon as I hook it in SVN it doesn't work.
Running the Hook (we installed SVN on windows) by the command line it
gives me the following error:
Can't spawn "cmd.exe": No such file or directory
Does anyone had this message before and has a solution for this?
Merijn Boom
Re: Hook Script error
Posted by si <ss...@gmail.com>.
> All paths in hook scripts should be absolute paths.
Actually, under windows, environment variables may persist.
For example, svnserve 1.3.1 running as Local Service on
Windows XP with a post-commit hook:
@echo off
set > c:\set.txt
c:\set.txt yields:
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APR_ICONV_PATH=C:\Program Files\Subversion\iconv
CommonProgramFiles=C:\Program Files\Common Files
...[snip]
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\ATI Technologies\ATI Control Panel;C:\Program
Files\NAnt\bin;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program
Files\Subnant;C:\Program Files\Subversion\bin;C:\Program Files\7-Zip
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
...[snip]
USERPROFILE=C:\Documents and Settings\LocalService
VS80COMNTOOLS=C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
windir=C:\WINDOWS
Note that Path contains Subversion\bin.
What's more of a concern is svn >= 1.3.0 not allowing post-commit
hooks to spawn processes. It's been raised several times already
and no-one has responded? Do we have to bump to the dev mailing
list or file an issue?
Easy way to test under windows, try this as a post-commit hook:
@echo off
start /b defrag c:
(unless you defrag often you'll be waiting a while, so it's a good
chance to go play a game of binary zoo's mono ;-)
svn < 1.3.0 would spawn a process, svn >= 1.3.0 won't.
Painful if you use post-commit emails/backups/etc.
peace
si
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Hook Script error
Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 27, 2006, at 19:14, Merijn Boom wrote:
> Based on the svn-shadow.pl script I wrote an addition to copy files
> over windows shares (I have to add SSH as well). When I run the
> perl script manually it works fine. As soon as I hook it in SVN it
> doesn’t work. Running the Hook (we installed SVN on windows) by the
> command line it gives me the following error:
>
>
>
> Can’t spawn “cmd.exe”: No such file or directory
>
>
>
> Does anyone had this message before and has a solution for this?
All paths in hook scripts should be absolute paths. That's a common
problem when writing hook scripts. Make sure that any time you call,
for example, svn.exe, that you list the full path to svn.exe,
wherever that is on your system. C:\foo\bar\svn.exe or whatever. The
same goes for any other files or scripts or logfiles you're using in
the hook. Always list the absolute path.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org