views:

120

answers:

2

Currently, I have a large SVN repository with a bunch of different projects within it, as follows:

/
 Project1/
          trunk/
          tags/
          branches/
 Project2/
          trunk/
          tags/
          branches/
 Project3/ 
          (etc...)

However, I'm now trying to break it up into separate repositories (for various reasons), and I would like the following for each project:

/
 trunk/
 tags/
 branches/

If possible, all history and externals should remain intact. However, I'm unsure if this can actually be done. I have seen several questions similar to this on SO but none entirely addresses the issue I have here. Basically I am trying to "pull out" a subdirectory and its entire contents with history from the old repository and plop the whole lot into its own (new) repository.

Am I asking the impossible?

+7  A: 

Use

svnadmin dump path/to/repository > repo.dmp

and then use svndumpfilter to only load a subtree into a new repository.

Stefan
Yeah... that's what I mean to say :)
John Weldon
Thank you Stefan (and John), this led me to http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering which addresses my exact problem.
Splash
+1  A: 

There are tools out there for migrating from subversion to different repositories, and they all basically re-create the revision history by iterating through each revision and applying the changes to the new repository.

In this case you could iterate through the history of each sub project and apply each revision as a change.

Keep in mind that this will mean you may not be able to keep the same revision numbers without some hacking.

Stefan's answer is of course what I'm trying to say but more succinctly and helpfully :)

John Weldon