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

Re: Any know of a Subversion sync program that I could run as a daemon?

From: Andreas Stieger <andreas.stieger_at_gmx.de>
Date: Tue, 25 Nov 2014 22:20:26 +0000

Hello,

On 25/11/14 21:54, Eric Johnson wrote:
> Problem: Now I need to trigger a sync whenever a commit comes in. In
> principle, this is easy - I just write a hook script and call svnsync.
>
> In practice, I have a bunch of requirements & desired features that make
> a simplistic solution problematic
>
> * Asynchronous - I don't want the person doing the original commit
> sitting around waiting for their commit to be broadcast to all the
> mirrors. I'm potentially looking at long delays either to distance
> or network pipe, and occasional large commits that take long enough
> even to send to the server in the first place.

The recommended configuration is to run sync calls in the background by
detaching it from the calling shell, thus allowing the already competed
revision to be marshalled back to the client. How to detach it from the
calling process depends on your platform so I will not give an example.
This will also allow you to fire off all syncs in parallel. In my
configurations, the typical RTT is 0 to 3 seconds.

> * Retry on fail - I want to be able to retry on fail, in case the
> problem is a transient network issue

Hooks will be re-called upon the next commit. Also hook this up to your
out-of-band monitoring to respond. Note that the stale lock situation is
actually the most frequent issue you will get with network issues, and
this cannot be solved by a retry.

> * Email on fail - I want an email if the sync fails
> * Logging - information to log files on both success and failure.

Again add logging to hook, and run out-of-band monitoring, e.g. run "svn
info" on all URLs, fetch the XML, compare the latest revision. I get a
nice little table with red/green numbers and dates.

> Are there any open source tools out there already that do that?

I am not aware of freely licensed complete toolsets for this. As the ASF
infra team runs such a setup there are certainly some public scripts.

Andreas
Received on 2014-11-25 23:21:24 CET

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.