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

How to rearrange repo without "svn: Cannot replace a directory from within"

From: Michael Harris <harmic_at_gmail.com>
Date: Sat, 15 Mar 2008 14:26:48 +1100


Several years back I set up an svn repo for a project I am involved
in. I didn't think too far ahead, and (I suspect) misread the
documentation, so I set up a repo structured like this:

     proj1 --+

In other words the repo has a single folder at its root (with the name
of the project as its name), and this folder contains folders trunk,
branches, tags.

We are using svnserver and svn:// to access the repo. When I set up
the svnserve configuration, I set <repo_root> as the root for
svnserve, so the URL:


points at the trunk of the repo, which is stored in


Now, a couple of years later, I want to establish additional whole
repos on the same server. With it set up the way it currently is, I
can't do this because the server root points straight at the directory
containing the existing repo. Of course I could change the server root
so it is pointing one dir up the filesystem heirarchy but then the url
would be:


Which ain't so good. I realised that my main mistake was to create the
proj1 directory inside the repo in the first place, so I want to
rename trunk, branches and tags to be at the top level, then move the
svnserver root up one as well.

So, to try it out, I made a copy of my repo on another machine and
tried the following steps:

1) Move trunks, branches and tags up a level so they are at the top of
the hierarchy, like this:

svn mv svn://server.name/proj1/trunk svn://server.name/trunk -m "SVN
Repo reorganisation Pt1"

(repeated for branches and tags as well).

2) Stop the svnserve, edit the config file, and change the server
root. Before, the server root was:


After it became


Then restart svnserve. Everything seems fine, the URL for accessing
the repo remains the same, and newly checked out WCs work fine.

The problem is, working copies that were checked out before the change
are no good any more! If I try to do even an svn st -u, I get the

svn: Cannot replace a directory from within

Is there any way to make this change without ruining all existing
working copies?

Thanks in advance,

Regards // Mike

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-15 04:27:09 CET

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.