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

Re: Moving root repository

From: <cmpilato_at_collab.net>
Date: 2002-10-17 06:00:57 CEST

Brandon Ehle <azverkan@yahoo.com> writes:

> Is there anyway to move a repository that was accidentally imported in
> the root "/" to the "/trunk" directory? > svn mv http://tux/svn/uw
> http://tux/svn/uw/trunk -m "Moved uw to trunk" --username behle
>
> svn: Trying to use an unsupported feature
> svn: cannot copy path 'http://tux/svn/uw' into its own child
> 'http://tux/svn/uw/trunk'
>
> There are roughly 150 directories & files in the root that need to be
> moved, is there anyway to achieve this via wildcards or something else
> I don't know about short of moving every file by hand?

DISCLAIMER: This is an official hack suggestion. Make sure you back up your repository.

1. svnadmin dump repos > dumpfile
2. mv repos old_repos
3. svnadmin create repos
4. svn mkdir -m "Making trunk" file:///path/to/repos
5. Now, edit dumpfile in your favorite editor:
    a. Prepend "trunk/" to all "Node-path:" values
    b. If you have copy-from information anywhere, also prepend
        "trunk/" to any copy-from-paths, and remember to increment
        copy-from-revisions by 1.
    c. finally, remove the whole entry from Revision 0
6. svnadmin load repos < dumpfile

Piece o' cake.

Lemme know how it turns out for you (I tried it on a repos with no
copy-from stuff, and it worked fine).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 17 06:03:47 2002

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.