Take the 2-minute tour ×

We have a rather strict policy regarding our subversion repository that is also a large inconvenience. With our branches, anything that gets checked into subversion has to have redacted authentication credentials (e.g. database, user accounts, etc...). A file was added and committed with both names and passwords. There exists three revisions of this xml file:

First - File was added and committed with some irrelevant (to this question) content.
Second - File (among 3 other irrelevant files) was committed with authentication credentials as part of an entirely new block of XML.
Third - More files were added and checked in, none being newer versions of the bad file from the previous revision.
Fourth - Single bad file was checked in again with the authentication credentials (specifically, nothing else) removed.

I'd like to remove the second revision, and being that this is the first occurrence of this occurring, I've never had to deal with this before. I know it's difficult with subversion, as the intent of the software is to maintain your code revisions, not pick away and make changes to old revisions. Is this possible to delete one file from a previous revision, or overwrite it with the contents of a newer revision (i.e. replace the bad file from the second revision with the file from the fourth)?

share|improve this question
add comment

1 Answer

There is currently no obliterate functionality in Subversion. It has been discussed on several occasions, but it messes with the integrity of the repository and has yet to be implemented.

WARNING: That link has 11 years worth of discussion on svn obliterate.

A work-around is to back up the repository using svnadmin dump (LINK) and then restore the repository using svndumpfilter (LINK) preventing specific revisions from being added to the restored repository.

share|improve this answer
See SVN FAQ: subversion.apache.org/faq.html#removal –  bahrep Oct 2 '12 at 7:59
@bahrep Excellent find! Perfectly states the answer. –  Sean C. Oct 2 '12 at 13:08
add comment

Your Answer


