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

Re: Windows Shell Kung-Fu

From: Eric Lemes <ericlemes_at_gmail.com>
Date: 2006-10-06 16:45:36 CEST

2006/10/4, allan <allan@muly.dk>:
> that doesn't work for us on win2003. are you sure you don't have a
> client delay ? how long does your post-commit take. try and make it
> sleep 30 seconds for instance and watch your client hang.
You're right. It don't work.

Windows shell is very, very, very evil. I don't understand why it's not
something so easy like "runmyprocess &".

The solution for me is a hibrid one: 50% HookStart, 50% Windows Shell Kung
Fu (I loved this expression):

When HookStart is called, it ignores the environment variables. It spawns a
new process, so, we can't call a batch file from it. I need one to set the
environment vars and do it's magic. So, I got something like this:

assync.bat - The stuffs I want to run assynchronous
set REPOS=%1
set REV=%2
SET PATH=C:\PERL\BIN;c:\windows\system32;
SET OS=Windows_NT

perl c:\perl\bin\svnnotify --repos-path %REPOS% -r %REV% --to
myemail@myprovider HTML::ColorDiff -d --from
svn@architettura.com.br--subject-cx --subject-prefix "[SVN]"
--io-layer raw --charset cp850

set REPOS=%1
set REV=%2
"c:\program files\hookstart" c:\windows\system32\cmd.exe /c
c:\svn\crk\hooks\assync.bat %REPOS% %REV%

Received on Fri Oct 6 16:46:28 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.