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

Re: Relocate broken?

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Sat, 2 Aug 2008 05:22:10 -0500

On Aug 1, 2008, at 12:08, Robert Dailey wrote:

> On Fri, Aug 1, 2008 at 12:06 PM, Robert Dailey wrote:
>
>> On Thu, Jul 31, 2008 at 7:56 PM, Ryan Schmidt wrote:
>>
>>> Subversion seems to think you are trying to change both the
>>> repository part of the path and the part of the path that's
>>> within the repository.
>>>
>>> Show us "svn info" on your old working copy that you want to
>>> relocate, and on a new working copy freshly checked out from the
>>> moved repository.
>>
>> Yes, that is what I'm doing I believe. However, it should still
>> work perfectly fine. The fact that this failed is an obvious bug
>> to me. There's no point in having a relocate function if it breaks
>> under certain circumstances.

It's not that the "relocate" command breaks under certain conditions;
it's that it is only appropriate for use under certain conditions --
namely, only when you want to change the repository root portion of
the URL, and not when you want to change a part of the URL within the
repository. Now, based on what you said above and the info you copied
below, it sounds like you really do need to change only the
repository root portion of the URL, so relocate should be exactly
what you need.

"svn switch --relocate <OLD> <NEW>" is only for use when you want to
change the part of the URL that leads up to the repository -- the
repository root. You might use this when your repository server's
hostname or port has changed, or if you are switching from hosting a
single repository to hosting multiple repositories and are therefore
adding an extra path component to the URL, or if you are switching
repository access methods, e.g. from svnserve to apache, and are
therefore changing the protocol portion of the URL. In your case,
many of these situations apply, which is fine. "svn switch --
relocate" merely rewrites information in your working copy's .svn
directories to point it at the new server; it does not need to
exchange information with the repository (other than perhaps
verifying that the repository exists).

"svn switch <NEW>" is only for use when you want to change the part
of the URL that is within the repository. You would use this e.g. to
switch a working copy from the trunk to a branch. "svn switch" is a
superset of "svn update" and does talk to the repository to retrieve
changes.

I think it is unfortunate that these two very different functions are
conceptually joined within a single command name. I personally would
have preferred "svn relocate" and "svn switch".

>> Here is the "svn info" for the old repository:
>> C:\>svn info svn://teamserver/svn
>> Path: svn
>> URL: svn://teamserver/svn
>> Repository Root: svn://teamserver/svn
>> Repository UUID: a9578b1d-4139-ce4f-bdde-bf21447891c7
>> Revision: 344
>> Node Kind: directory
>> Last Changed Author: robert
>> Last Changed Rev: 344
>> Last Changed Date: 2008-07-30 15:14:27 -0500 (Wed, 30 Jul 2008)
>>
>> Here is the "svn info" for the new repository:
>> C:\>svn info http://teamserver:1337/svn/vfxrepo
>> Path: vfxrepo
>> URL: http://teamserver:1337/svn/vfxrepo
>> Repository Root: http://teamserver:1337/svn/vfxrepo
>> Repository UUID: a9578b1d-4139-ce4f-bdde-bf21447891c7
>> Revision: 363
>> Node Kind: directory
>> Last Changed Author: robert
>> Last Changed Rev: 363
>> Last Changed Date: 2008-07-31 19:36:25 -0500 (Thu, 31 Jul 2008)
>
> Sorry, I just realized you wanted the svn info on the working
> copies. here you go:
>
> C:\>svn info C:\it\work\old_jewett
> Path: C:\IT\work\old_jewett
> URL: svn://teamserver/svn/vfx/trunk
> Repository Root: svn://teamserver/svn
> Repository UUID: a9578b1d-4139-ce4f-bdde-bf21447891c7
> Revision: 342
> Node Kind: directory
> Schedule: normal
> Last Changed Author: robert
> Last Changed Rev: 342
> Last Changed Date: 2008-07-29 15:35:50 -0500 (Tue, 29 Jul 2008)
>
> C:\>svn info C:\it\work\jewett
> Path: C:\IT\work\jewett
> URL: http://teamserver:1337/svn/vfxrepo/vfx/trunk
> Repository Root: http://teamserver:1337/svn/vfxrepo
> Repository UUID: a9578b1d-4139-ce4f-bdde-bf21447891c7
> Revision: 363
> Node Kind: directory
> Schedule: normal
> Last Changed Author: mike
> Last Changed Rev: 346
> Last Changed Date: 2008-07-31 16:31:37 -0500 (Thu, 31 Jul 2008)

Ok, so happily it looks like these are the same repository (same
UUID) and in both cases it looks like the part of the URL that is
within the repository is "/vfx/trunk". So nothing about the layout
within the repository has changed; it's just the repository root
portion of the URL that has changed. And that's what "relocate" is
designed to handle.

In the "old_jewett" working copy, this should work:

svn switch --relocate \
svn://teamserver/svn \
http://teamserver:1337/svn/vfxrepo

Is that the command you were using?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-02 12:22:42 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.