[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: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Sun, 27 Apr 2008 17:09:44 +0200

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.
I think that all svnsync subcommands should always check URLs rather UUIDs.

> The run_test() function in svnsync_tests took advantage of this by setting the
> mirror's UUID to the source's UUID as soon as it created the mirror. This
> patch makes it not do so until it finished running svnsync.
>
> This only touches the 'initialize' command, so it doesn't prevent people
> from setting their mirrors' UUID to the mirrored repos's UUID after they
> initialize the mirror.
>
> Passes svnsync_tests.py.
>
> [[[
> In svnsync, do not allow source and destination to be the same repository.
>
> * subversion/svnsync/main.c
> (do_initialize):
> Return an error when FROM_UUID equals TO_UUID.
>
> * subversion/tests/cmdline/svnsync_tests.py
> (uuid): Import.
> (run_test): Defer setting the mirror repository's UUID to the source
> repository's UUID to just before comparing the dumpfiles.
> ]]]

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-04-27 17:13:19 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.