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

Re: Can't get switch --relocate to work, always "Cannot replace a directory from within"

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2006-07-04 11:32:59 CEST

On 7/4/06, Markus Fischer <markus@fischer.name> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Erik Huelsmann wrote:
> >> I've a quite big checkout (~ 600MB) and moved the subversion repository
> >> from file:///svn/proj/subdir to https://domain/svn/proj/trunk/subdir.
> >>
> >> So as can be seen, before it was proj/subdir in SVN and then I moved it
> >> to proj/trunk/subdir.
> >
> > well, the question is: what was your repository path (/svn/proj?) and
> > what is it now (https://domain/svn/proj?)?
>
> Yes, sorry I seem to mix up my own paths.
>
> Old repos: file:///svn/
> New repos: https://domain/svn/repos
>
> Thus:
> file:///svn/proj
> became
> https://domain/svn/repos/proj/trunk
> (I also created tags/branches/trunk in the new repos)
>
> >
> > You may have done more than just relocated, but I can't see that from
> > your report above. Could you tell us a bit more what you did when
> > relocating it?
>
> I dumped file:///svn and loaded it into the existing repository at
> https://domain/svn/repos, there it was accessible as
> https://domain/svn/repos/proj . Then I shove around and created
> directories so that the new path was https://domain/svn/repos/proj/trunk .
>
> >
> >>
> >> Then I used switch to switch my working copy to the new URL:
> >>
> >> svn switch --relocate file:///svn/proj https://domain/proj/trunk
> >
> > This is only correct if you moved your *repostory* from /svn/proj to
> > https://domain/svn/proj/trunk, which I somehow doubt.
>
> But that's exactly what I did, but I didn't just "moved" it but dumped
> and loaded it into the new place and then moved around directories.

Umm, no, not exactly: you 'moved' your repository from file:///svn/ to
https://domain/svn/repos/. So, you should relocate that way.

Then, you moved a repository path from <repos>/proj/ to
<repos>/proj/trunk. What happens is that the server sends a delete
command to the working copy for /proj/ and an add for /proj/trunk/.
But even before the /proj/ directory is deleted, the working copy
notices that it is currently rooted *within* /proj/, telling you it
can't delete itself. The easiest way to overcome that problem is to
use switch (without relocate) to switch from the current path to the
new trunk. But, then the paths must still be correct in 'svn info':
https:///domain/svn/repos/proj/ with the old revision number (38?).

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 4 11:36:04 2006

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.