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

Re: [Issue 2380] New - 'svn switch --relocate' silently fails

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-08-10 08:39:02 CEST

On Tue, 9 Aug 2005 kfogel@tigris.org wrote:

> http://subversion.tigris.org/issues/show_bug.cgi?id=2380
> Summary|'svn switch --relocate' silently fails
>
Karl,

Let's have a little discussion about this on the list. This is not new,
but for the particular reproduction recipe, the repos-root work (r15015)
is involved.

> This reproduces with r15650 of trunk (HEAD right now):
>
> $ svn info
> Path: .
> URL: http://svn.collab.net/repos/cvs2svn/trunk
> Repository Root: http://svn.collab.net/repos/cvs2svn
> Repository UUID: be7e6eca-30d4-0310-a8e5-ac0d63af7087
> Revision: 1428
> Node Kind: directory
> Schedule: normal
> Last Changed Author: fitz
> Last Changed Rev: 1428
> Last Changed Date: 2005-05-23 11:01:32 -0500 (Mon, 23 May 2005)
> Properties Last Updated: 2004-07-07 10:22:36 -0500 (Wed, 07 Jul 2004)
>
> $ svn switch --relocate http://svn.collab.net/repos/cvs2svn/trunk \
> http://cvs2svn.tigris.org/svn/cvs2svn/trunk .
> $ svn info
> Path: .
> URL: http://svn.collab.net/repos/cvs2svn/trunk
> Repository Root: http://svn.collab.net/repos/cvs2svn
> Repository UUID: be7e6eca-30d4-0310-a8e5-ac0d63af7087
> Revision: 1428
> Node Kind: directory
> Schedule: normal
> Last Changed Author: fitz
> Last Changed Rev: 1428
> Last Changed Date: 2005-05-23 11:01:32 -0500 (Mon, 23 May 2005)
> Properties Last Updated: 2004-07-07 10:22:36 -0500 (Wed, 07 Jul 2004)
>
> $
>
> Notice how the URL hasn't changed, even though 'switch --relocate'
> didn't error.
>

Using 1.2.x, something like
svn switch htp https
(in a repository checked out using an http URL)
has the same problem. svn switch --relocate only rewrites an URL prefix if
the FROM argument matches (r15015 adds the check that the FROM argument
must not be longer than the repository root if that's known).

The problem is that this check is made for each entry, and it has to be
that way because there is no guarantee that a working consistent regarding
repository root. (I was, for example, able to svn switch --relocate a
file, and you could have relocated just a subdirectory of your WC). And
you can also have a working copy where the root directory doesn't have a
repository root in its entry, but some subset of the WC has.

So, we can't check the FROM argument before starting to relocate (or we
could, in a separate pass, maybe), and it is legitimate for just a subset
of a WC to be relocated by a relocate command.

So, even if this is not strictly a bug, I agree that it is a usability
problem. Maybe the best thing is to just warn afterwards if no entries
were relocated. Maybe r15015 should have failed immediately when the FROM
argument is longer than the repository root. In retrospect, I can't
imagine when it would be good to continue in that case. We might leave an
inconsistent WC behind anyway in some corner cases.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 10 10:22:39 2005

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.