2
votes

I have an SVN repository containing multiple top-level folders, one per project. Inside each project folder is the usual trunk, branches, tags.

I need to move one of these project folders into its own independent repository for export and subsequent import on to another server. The new single-project repository must contain only the revision history for that project, and none from the other projects.

Any ideas on how best to proceed?

Server is VisualSVN Server on Windows, although this shouldn't make any difference.

3

3 Answers

9
votes

You can use svnadmin dump, pipe the output through svndumpfilter and the output of that to svnadmin load.

The svndumpfilter is made to do exactly what you want to do. You can use the include subcommand to specify the project you want in the repository and leave out the rest.

The svnadmin load allows you to specify the directory in the repository where you want the output stored.

Take a look at the Repository Maintenance section of the on line manual.

1
votes
  1. In TortoiseSVN you have the option to export a project from the repository (strips svn information).
  2. Create your new Repo on the server
  3. Checkout the new SVN repo to your drive
  4. copy the exported files to the new repo
  5. Commit.

There you go, new clean repo.

0
votes

One thing to do, is to take a sequence of svn dumps of the check-ins done for that folder. Name them according to their revision number. Now in your new SVN repo, import them in order. Try it out on a test repo to iron out kinks if any but this should be doable. Use the svndump command detailed here.