remote svn update on server farm

170 views Asked by At

I wrote an svn hook that triggers upon commit. The goal is to automatically update multiple servers by running svn update on each.

So my server topology consists of (all running under Windows 2012):
a) SVN_server
b) server1,...,N

I use PsExec to invoke svn update from SVN_server to server1,...,N

As the updated directory is used by the web server (IIS) some files may be in use at the time of the svn update, so I would expect it to fail occasionally.

What happens though, is that intermittently the svn update hangs! When inspecting with ProcessExplorer I see that psExec runs svn update which in turn runs a child process under the name of "conhost". I assume this would be some interactive prompt but I have no way of redirecting standard output to a file in order to investigate further.

FYI, the post-commit.bat hook (on repository mysite) looks like:

:: first update SVN_server working folder
svn update d:\websites\mysite

:: then update server1,..,N
cmd /c c:\tools\PsExec.exe -i -u Admin -p Passw \\swWeb01 -h  c:\tools\svn update d:\websites\mysite

cmd /c c:\tools\PsExec.exe -i -u Admin -p Passw \\swWeb02 -h  c:\tools\svn update d:\websites\mysite
  1. how can I redirect stdout/stdin in the remote svn update?
  2. after killing the blocked svn update process the svn directory becomes dirty. I have to use svn cleanup to recover. Any ideas why this is happening and how can I resolve it?
0

There are 0 answers