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

Re: [PATCH] svnsync init URL1 URL1

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Sun, 27 Apr 2008 20:34:46 +0300 (IDT)

Mark Phippard wrote on Sun, 27 Apr 2008 at 11:14 -0400:
> On Sun, Apr 27, 2008 at 11:09 AM, Arfrever Frehtes Taifersar Arahesis
> <arfrever.fta_at_gmail.com> wrote:
> > 2008-04-27 16:07:42 Daniel Shahaf napisał(a):
> > > I discovered today by accident that trunk svnsync doesn't care if the
> > > source and destination are the same:
> > >
> > > > svnsync init file:///tmp/repos file:///tmp/repos
> > > Copied properties for revision 0 (svn:sync-* properties skipped).
> > >
> > > This patch changes it to notice that:
> > >
> > > > svnsync init file:///tmp/repos file:///tmp/repos
> > > ..\..\..\subversion\svnsync\main.c:632: (apr_err=195012)
> > > svnsync: Cannot sync a repository to another with the same UUID
> >
> > svn:sync-from-url, svn:sync-from-uuid and svn:sync-from-url can be set manually.

True, but what are you trying to say by stating this fact?

> > I think that all svnsync subcommands should always check URLs rather UUIDs.
>
> Isn't one of the main use-cases for svnsync to sync it to a repository
> that has the same UUID? So that it can be used with the DAV
> mirroring, or as a hot-backup etc?
>

As I said originally: the patch only touches do_initialize(), so it will
not distrub these use-cases. After 'svnsync init', the destination
repos's UUID can be changed arbitrarily, svnsync won't even read it.

Before:

        rsync $REPOS $MIRROR
        svnsync init $MIRROR $REPOS
        #
        while true; do svnsync sync; done;

After:

        rsync $REPOS $MIRROR
        UUID=`svnlook uuid $MIRROR`
        svnadmin setuuid $MIRROR
        svnsync init $MIRROR $REPOS
        svnadmin setuuid $MIRROR $UUID
        #
        while true; do svnsync sync; done;

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-27 19:34:51 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.