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

Re: svn switch --relocate needs access the repo(s)?

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 3 Sep 2009 00:10:18 +0100

On Wed, Sep 02, 2009 at 04:12:45PM -0600, Mac Newbold wrote:
> In older versions of subversion, it seems that the --relocate switch would
> let you change the URL to your repository without needing to contact the
> old repository nor the new one. It would simply make the changes to the
> local working copy.
>
> In current documentation here:
> http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.switch.html
>
> It looks like that has changed, and now it insists on accessing the URL
> before it will carry out the changes to the working copy.

The client contacts the server to find the UUID of the repository
you are switching to. It will complain if the repository UUID recorded
in the working copy and the one retreived from the repository you
are relocating to don't match. That explains your problem.
 
> Is there any way to get the old behavior again? I tried the --force
> switch, but it still fails if it can't contact the new repo.

> I'm all in favor of sanity checking, as long as there's a way to override
> it with a flag for "i know what I'm doing", which I thought is what
> --force was intended to be. Maybe a "don't access the network" flag would
> be even better.

Yes, we could provide a command-line switch that disables this check,
like --i-know-what-i-am-doing or maybe even --no-uuid-check.

Would you take the time to file an issue to track this enhancement
request? It should not be hard to do this and maybe someone will find
the time to implement this before 1.7.0 is released.

In return for filing the issue, and if you really need this enhancement
right now, you could try disabling the uuid check with the patch below
(against 1.6.x). I haven't tested this patch but I think it should do
the trick.

Stefan

Index: subversion/libsvn_client/relocate.c
===================================================================
--- subversion/libsvn_client/relocate.c (revision 39053)
+++ subversion/libsvn_client/relocate.c (working copy)
@@ -58,6 +58,7 @@
                const char *root_url,
                apr_pool_t *pool)
 {
+#if 0
   struct validator_baton_t *b = baton;
   struct url_uuid_t *url_uuid = NULL;
 
@@ -104,6 +105,7 @@
       (SVN_ERR_CLIENT_INVALID_RELOCATION, NULL,
        _("The repository at '%s' has uuid '%s', but the WC has '%s'"),
        url, url_uuid->uuid, uuid);
+#endif
 
   return SVN_NO_ERROR;
 }

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2390462

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-03 01:11:57 CEST

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

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