How to permanently remove a SVN folder
Wednesday, October 7th, 2009
Recently I wanted to permanently remove a folder from Subversion repository.
Basically it was a folder with large amount of test data, and I decided to rename every single file inside. Doing it with ‘SVN rename…’ for 3000 items was out of question.
The solution was quite simple:
First dump the whole repository:
svnadmin dump "D:\My projects\SVN Data" > dumpfile.txt
Second filter the folder I wanted to remove:
svndumpfilter exclude Mail\eml < dumpfile.txt > filtered-dumpfile.txt
Then delete and create a new repository:
Delete repository
Create repository
Finally load the filtered dump into SVN repository:
svnadmin load "D:\My projects\SVN Data" > filtered-dumpfile.txt
You can also use this procedure for upgrading SVN repository version.
