How to permanently remove a SVN folder
Recently I wanted to permanently remove a folder from Subversion repository.
Basically it was a folder with large amount of test data (email messages used for unit testing our Mail.dll email component), 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
svnadmin create "D:\My projects\SVN Data"
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.
May 31st, 2014 at 18:28
god bless u
May 31st, 2014 at 18:48
This line:
svnadmin load “D:\My projects\SVN Data” > filtered-dumpfile.txt
Should be
svnadmin load “D:\My projects\SVN Data” < filtered-dumpfile.txt
June 1st, 2014 at 06:55
Corrected. Thanks!
August 26th, 2016 at 18:27
thanks so much.
September 20th, 2016 at 11:18
Thank you. Perfect!!