Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move Subversion repository without history

There are a lot of posts on moving a Subversion history with version history but i am looking to do something different.

Basically we have a repository that has been used as a proof of concept and we want to archive this. However we want to create a new repository with the latest version of some the code but with author histroy saved but it's a fresh start so we aren't interested in keeping the version history. Plus we are trying to keep the repository size down as there were binaries saved in the past that is causing the repository to be far too large.

I will also at the same time want to remove some of the folders which I think I can use the dump filter on?

As I want to keep user information checking out and checking back into the new place wouldn't be the preferred option.

like image 508
Firedragon Avatar asked Jan 01 '26 04:01

Firedragon


2 Answers

To have the latest version of the files with their author, commit date and commit message, you will have to use svnadmin dump to create a dump file from your repository and svndumpfilter to filter out the revisions you don't want to keep.

Working with svndumpfilter is in general a very frustrating exercise and you might need to rely on derived (and often ill-maintained) programs such as svnfiltereddump, svndumpsanitizer, svndumpfilter2 or svndumpfilter3.

In the end you should ask yourself the question if the cleanup in the history is really worth the effort.

like image 60
Filip De Vos Avatar answered Jan 06 '26 16:01

Filip De Vos


You can simply do an svn export of the projects you want to continue to have and do on the new repository a svn import. Before the import just remove the files you don't want to import.

like image 32
khmarbaise Avatar answered Jan 06 '26 14:01

khmarbaise



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!