Add new comment

Below is the script in my SVN post-hook; Fails to execute, and hangs at the psexec command (LAST LINE)

-----------------------------------------------------------------
@ECHO off

SET REPOS=%1
SET REV=%2

SET SVNLOOK=C:\Subversion1_6\bin\svnlook.exe

SET LOGFILE=C:\autofixmantisbtbugs\svnlog%REV%.txt
SET AUTHORFILE=C:\autofixmantisbtbugs\svnauthor%REV%.txt
SET OUTPUTFILE=C:\autofixmantisbtbugs\svnoutput%REV%.txt

%SVNLOOK% log -r %REV% %REPOS% > %LOGFILE%
%SVNLOOK% author -r %REV% %REPOS% > %AUTHORFILE%

TYPE %LOGFILE% > %OUTPUTFILE%
ECHO -------- >> %OUTPUTFILE%
ECHO Checked into repository >> %OUTPUTFILE%
ECHO %REPOS% (Revision %REV%) >> %OUTPUTFILE%
ECHO by >> %OUTPUTFILE%
TYPE %AUTHORFILE% >> %OUTPUTFILE%
CALL DEL %LOGFILE%
CALL DEL %AUTHORFILE%

net use P: \\192.168.1.91\svnmantisfiles xxxxxxx /USER:MANTISSERVER\Administrator

TYPE %OUTPUTFILE% > Q:\svnoutput%REV%.txt
CALL DEL %OUTPUTFILE%

ECHO D:\sgrcbugtracker\php\php.exe D:\sgrcbugtracker\apache\Apache2\htdocs\mantisbt\core\checkin.php ^< D:\sgrcbugtracker\svnmantisfiles\svnoutput%REV%.txt > Q:\svnautocheckin%REV%.bat
ECHO DEL /Q D:\sgrcbugtracker\svnmantisfiles\svnoutput%REV%.txt >> Q:\svnautocheckin%REV%.bat
ECHO DEL /Q D:\sgrcbugtracker\svnmantisfiles\svnautocheckin%REV%.bat >> Q:\svnautocheckin%REV%.bat
net use Q: /DELETE

C:\autofixmantisbtbugs\psexec.exe \\192.168.1.91 -u MANTISSERVER\Administrator -p XXXXXXX D:\sgrcbugtracker\svnmantisfiles\svnautocheckin%REV%.bat
-------------------------------------------------------------------------------------

This script creates a batch file and a log file on the remote MANTISSERVER. batch file is to run checkin.php with appropriate SVN log file. But the psexec within this script is not able to run the batch file.

But I am able to run the same batch file successfully from the SVN machine on cmd prompt as well as through a batch file.

Other commands with psexec (cmd.exe /C ipconfig /all) through SVN hook also fails.

Both machines (SVN and MANTISSERVER) are NOT part of any domain, both are Windows 2008 servers.

Any ideas?