Move single SVN folder into a new repository - how?
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 o开发者_如何学Cwn 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.
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.
- In TortoiseSVN you have the option to export a project from the repository (strips svn information).
- Create your new Repo on the server
- Checkout the new SVN repo to your drive
- copy the exported files to the new repo
- Commit.
There you go, new clean repo.
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.
精彩评论