David Glasser wrote on Mon, 28 Apr 2008 at 07:02 -0700:
> On Mon, Apr 28, 2008 at 12:24 AM, Daniel Shahaf <d.s_at_daniel.shahaf.co.il> wrote:
> > David Glasser wrote on Sun, 27 Apr 2008 at 23:46 -0700:
> > > On Sun, Apr 27, 2008 at 10:38 PM, Daniel Shahaf <d.s_at_daniel.shahaf.co.il> wrote:
> > > > > Perhaps this check might be reasonable if it's actually a check that:
> > > > >
> > > > > * dest.HEAD == 0 (already done)
> > > > > * dest.uuid == src.uuid (your patch)
> > > > > and
> > > > > * src.HEAD == 0
> > > > >
> > > > > ie, "you're trying to sync from an empty repository to another empty
> > > > > repository with the same UUID; are you sure you entered two different
> > > > > repositories?"
> > > > >
> > > >
> > > > Why src.HEAD == 0? Suppose someone has many svnsync'ed same-UUID
> > > > repositories and creates a new repository. When they create it, they
> > > > might create and init the mirror at the same time -- hitting this check.
> > >
> > > Well, I'm confused. What are you actually trying to prevent with the
> > > original check?
> > >
> >
> > I am trying to prevent syncing an instance of a repository[1] to itself.
> > Is it possible to tell apart two instances that have the same UUID?
>
> I just think that in practice, the "dst.HEAD == 0" check will cover
> 99% of cases where somebody accidentally enters the same repository
> twice.
>
Possibly, but I don't think a check that prevents running 'svnsync init
$R $R' (where $R is an empty repository) is very useful. Most likely $R
can be thrown away and recreated.
> --dave
>
> > (Equality of UUIDs is a necessary but not sufficient condition for
> > identity of instances, and equality of URLs is sufficient but not
> > necessary.)
> >
> > Daniel
> >
> > [1] "An instance of", since in DAV mirroring, etc., there are actually
> > two "instances" of the same repository.
> >
> >
>
>
>
>
---------------------------------------------------------------------
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-28 19:36:33 CEST