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

Re: svnsync and the hooks scripts

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-11-09 20:57:08 CET

On Nov 9, 2007, at 05:21, Grégoire Welraeds wrote:

> I’m setting up a repository mirror with svnsync and I’m a bit
> worried about the revision properties which can change at any time.
> To have a perfect mirror, the only way is to call svnsync from post-
> commit hook and pre-revprop-change hook.
>
> Starting "svnsync sync" to synchornize a mirror once every x time
> from a script (eg: called with crontab) will most probably miss
> some revprop changes. And if "svnsync copy-revprops" is called from
> the pre-revprop-change hook, then there is no other choice but to
> call "svnsync sync" post-commit hook. Otherwise you put your mirror
> at risk. For instance:
> 1. svnsync sync is called from a script once every hour, svnsync
> copy-revprops is called from the pre-revprop-change hook:
> - svnsync sync is called. Mirror is updated to rev x, one hour of
> delay. During that time:
> - commit in master of rev x+1
> - revprop change to modify svn:log in master for rev x+1
> - svnsync copy-revprops called for rev x+1
> => x+1 is not yet commited in the mirror.
> 2. svnsync copy-revprops is not called from pre-revprop-change
> - svnsync sync is called from the hourly script. Mirror is updated
> to rev x. One hour of delay.
> During that time:
> - commit in master of rev x+1
> - revprop change to modify svn:log in master for rev x+1
> - revprop change to modify svn:log in master for rev x-5
> - svnsync sync is called from the hourly script again. Mirror is
> updated to rev x+1
> => revprop change for rev x+1 will be populated correctly, not the
> revprop change for rev x-5
>
> I though I would share with you my opinion that the only efficient
> way to synchronize a mirrored repository is to call "svnsync sync"
> and "svnsync copy-revprops" from respectively post-commit hook and
> pre-revprop-change hook. Although it might obvious, it is not
> clearly stated in the documentation I have read on svnsync.
>
> Your comments are appreciated.

Replace all occurrences of "pre-revprop-change" with "post-revprop-
change" and I would agree with you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Nov 9 20:57:43 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.