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

Re: relocate doesn't check arguments - may screw up working copy

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-05-13 18:54:30 CEST

On Thu, 2004-05-13 at 11:40, SteveKing wrote:

> I did read it carefully :)
> This is usefull if you don't want to specify the complete URL for the
> relocate. So if the server changes from http://server1.com/repos/ to
> http://server2.com/repos/ you could do
> svn switch --relocate http://server1 http://server2
> to relocate your working copy.

Correct.

> But as I already mentioned, if you do a
> svn switch --relocate . http://server2.com/repos/
> you will end up with a working copy which points to a crippled URL.

This is obviously a bug; we're not doing enough sanity checking.

>
> So my suggestion is that the relocate only takes one argument (the "to"
> URL).

We're going in circles here. If you ask perl to 's/X/Y/', but only give
Y, how is it supposed to guess at X?

> But you would have to specify the full URL to the new repository
> for that to work:
> svn switch --relocate http://server2.com/repos
> would then read the "from" URL from the working copy where the command
> was executed and substitute that with the "to" URL.

This is bad and dangerous: we cannot just assume X is the entire URL
stored in the working copy. If the user accidentally types the full Y
URL incorrectly, then they may end up changing the 2nd half of the URL,
when they only meant to change the 1st half.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 13 18:59:17 2004

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.