[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: Mon, 28 Apr 2008 08:38:08 +0300 (IDT)

David Glasser wrote on Sun, 27 Apr 2008 at 13:31 -0700:
> 2008/4/27 Daniel Shahaf <d.s_at_daniel.shahaf.co.il>:
> > 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
>
> I think the real use cases that this prevents are important, and this
> would just add another step of hassle.
>

OK. (The hassle can be automated, but you know that.) I hadn't
considered all possible uses -- I admit that.

> 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.

---------------------------------------------------------------------
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 07:38:18 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.