Bailey, Darragh wrote:
> Looking to setup a mirror to a locally hosted svn repo, however it's
> expected that in the future the role of which repo is the mirror and
> which is the master will reverse.
>
> Reading up on svnsync, there appears to be some suggestion that something
> happens with the 'svnsync init' command that is specific to the new
> mirror. I'm wondering if this will be an issue when changing which repo
> is the master and which is the mirror?
>
> It's not clear what exactly is set by this initial command. AFAICT it's
> only the last changed datestamp on rev 0, i.e. the initial create time of
> the source repository. It doesn't appear to copy the UUID, or provide an
> option to copy this, although maybe that's just because of the version
> I'm testing this on (1.4).
All that 'svnsync init' does is set a bunch of revision properties on r0 in
the new mirror repository.
$ svn plist -v -r0 --revprop file:///usr/local/svn/subversion
Unversioned properties on revision 0:
svn:sync-from-uuid
612f8ebc-c883-4be0-9ee0-a4e9ef946e3a
svn:sync-last-merged-rev
39208
svn:date
2001-08-31T04:23:30.644170Z
svn:sync-from-url
http://svn.collab.net/repos/svn
$
To switch your notion of "source" and "sync" repository, you'll need to set
similar properties on the new "sync" repository. But you'll have to do so
by hand (using 'svn pedit' or 'svn pset'), because 'svnsync init' gets fussy
if you aren't operating on a clean repository. (In Subversion's trunk --
that is, 1.7.0-to-be -- I've added an --allow-non-empty option to 'svnsync
init' which allows you to init an already populated copy of a repository as
a mirror of the original. No more hand-editing of those revprops.)
--
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on 2010-02-02 18:58:48 CET