Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I move an existing Subversion repository into a new parent repository (and retain the history)?

Tags:

svn

Currently I have a root-level repository set up for each project, like so:

Project1 Project2 Project3 Project5 Project5 

I'd like to reorganise this so that rather than a repository for each individual project, I just have one for each logical grouping, and then the projects would just be folders within those 'group repositories', e.g:

WebSites     Project1     Project2 DesktopApps     Project3 Libraries     Project4     Project5 

Is this at all possible while retaining the history of the existing repositories? I've looked around quite a bit but all I can find is stuff on moving folders about within the same repository, and moving folders out of a repository into a new repository.

It's only for personal stuff anyway, so it's not the end of the world if it's just a straight 'no' - but it would be nice to know so I'm not just banging my head against a wall :)

like image 827
Mark Bell Avatar asked Jan 26 '09 10:01

Mark Bell


People also ask

How do I move files in SVN without losing history?

If you right-drag the folder and use "SVN move versioned item(s) here", then you keep the history. Even the history of the files within the folder.


2 Answers

You should be able to dump it, then reload it to a subdirectory of a new repository:

svnadmin dump http://oldrepo/ > mydump

svnadmin load --parent-dir my/new/folder http://newrepo/ < mydump

like image 91
Steven Robbins Avatar answered Oct 04 '22 22:10

Steven Robbins


svnbook: Migrating Repository Data Elsewhere

like image 45
Karsten Avatar answered Oct 04 '22 23:10

Karsten