How to permanently remove a SVN folder

svnRecently 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.

Tags:

Questions?

Consider using our Q&A forum for asking questions.

5 Responses to “How to permanently remove a SVN folder”

  1. damian Says:

    god bless u

  2. damian Says:

    This line:
    svnadmin load “D:\My projects\SVN Data” > filtered-dumpfile.txt

    Should be
    svnadmin load “D:\My projects\SVN Data” < filtered-dumpfile.txt

  3. Limilabs support Says:

    Corrected. Thanks!

  4. pylover Says:

    thanks so much.

  5. David Fernandes Says:

    Thank you. Perfect!!