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

Re: Recreate repository with proper structure trunk/branches/tags - without losing change history?

From: Dave Neary <david_at_phenix.fr>
Date: 2004-09-29 18:10:40 CEST

Hi all,

Dave Neary wrote:
> An alternative way to do this is
> $ svnadmin dump /path/to/repos > dumpfile
> $ mv /path/to/repos /path/to/repos_saved_just_in_case
> $ sed -e 's/^\(Node-path: \)\(.*\)/\1trunk\/\2/;s/^\(Copy-from-path:
> \)\(.*\)/\1trunk\/\2/' dumpfile > dumpfile.new
> $ svnadmin create /path/to/repos
> $ svnadmin load dumpfile.new
> $ svn mkdir file:///path/to/repos/branches
> $ svn mkdir file:///path/to/repos/tags

Someone on IRC (beerfrick, come on down!) just showed me a *much* easier
way.

$ svnadmin dump /path/to/repos > dumpfile
$ mv /path/to/repos /path/to/repos_saved_just_in_case
$ svnadmin create /path/to/repos
$ svn mkdir -m "create directory structure" file:///path/to/repos/trunk
file:///path/to/repos/branches file:///path/to/repos/tags
$ svnadmin load /path/to/repos --parent-dir=trunk <dumpfile

The keen-eyed will have noticed that my svnadmin load command line in
the first mail was completely wrong. In my defense, I have loaded a
repository from a dumpfile twice ever, and both times I had to run with
-h first :)

Cheers,
Dave.

-- 
David Neary
Phenix Engineering
110 ave Jean Jaures, 69007 Lyon
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 29 18:11:45 2004

This is an archived mail posted to the Subversion Users mailing list.