Remove large revision from Subversion repository

0

I have website committed into a repository which (at a certain revision number) ballooned from around 30mb to 80gb! Assuming I'm not bothered about previous revisions and given the website is itself only 150mg in total, what's the best way to resolve this?

Thanks

Jeepstone

Posted 2014-10-15T16:36:37.497

Reputation: 101

Answers

0

It is nearly impossible to actually delete revisions from a repository, but if you can determine the actual revision where the size suddenly ballooned you can dump the repository out to a temporary file and load it into a new one.

Get onto the server where the SVN server is installed then:

svnadmin create newrepo
svnadmin dump -r 0:1000 > oldrepo.dump
svnadmin load newrepo < oldrepo.dump
mv repo oldrepo
mv newrepo repo

The 0:1000 denotes the start and end revisions that you want to restore/keep.

This SVN man page tells you how to make it work: Migrating Repository Data Elsewhere

Other than that there is no real easy way to simply nuke out one single revision.

Mokubai

Posted 2014-10-15T16:36:37.497

Reputation: 64 434