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

Re: svnsync from post-commit hangs

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-09-11 23:05:59 CEST

On Sep 11, 2007, at 07:28, Turaukar Yur wrote:

> I am trying to synchronize changes from one repository to another
> as new revisions are submitted. This is done by using an
> appropriate post-commit hook in the master repository which calls
> svnsync.
> Everything works fine (the mirror repos has been initialized, the
> current state was initially sync'ed, permissions are properly set,
> etc.).
> The only thing I noticed is that commits to the master repos
> started to be slow since the sync hook was established. SVN is
> running on a linux system (ubuntu 6) and basically uses the following:
> #!/bin/sh
> SVNSYNC=/usr/local/bin/svnsync
> $SVNSYNC synchronize URL_TO_MIRROR_REPO --username=svnsync --
> password=svnsyncpassword &
> exit 0
> (taken from the submerged svn blog)
> Notice the "&" at the end of the line, which I understand is
> supposed to run svnsync in the background and not have the post-
> commit hook wait for its completion.
> This is however exactly what I can see. It seems that a commit to
> the master always waits for svnsync to complete. Monitoring this,
> shows me that the commit sends files to svn (tortoise is used
> here). When all files have arrived, tortoise is waiting and I can
> see and svnsync process spawn on the svn server. The post-commit
> script is also still there with a process state of Z(ombie). When
> svnsync is done, both processes disappear from the process list and
> at the same time tortoise reports the commit has finished.
> What is wrong with this setup? Any help appreciated.

You must redirect both stdout and stderr to null:

--username=svnsync --password=svnsyncpassword >/dev/null 2>/dev/null &

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 11 23:04:19 2007

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.