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

[PATCH] svnsync init URL1 URL1

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Sun, 27 Apr 2008 17:07:42 +0300 (Jerusalem Daylight Time)

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

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

---------------------------------------------------------------------
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 16:08:09 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.