Reputation: 13537
I recently committed information to a file. Only a few lines of code that are HIGHLY confidential. I need to remove this information from the subversion repository COMPLETELY. How can I do that without reverting and losing changes? It's only in one file? So, is it possible to remove all references to that file, and then re-commit the correct one?
Upvotes: 0
Views: 233
Reputation: 107090
Can you wait until Subversion 1.8 comes out? That's when the highly requested obliterate command is implemented (unless, of course, they've decided to move it to Subversion 1.9 or 2.0).
No. Right?
The only thing you can do is to take down your repository, do a svnadmin dump
, filter it to remove the change using svndumpfilter
, and reload your repository using svnadmin load
. This can be done in a single pipeline, but depending upon your repository size, it could mean being down for a few hours.
I've done this several times. It's no fun, especially when you have to do it at 2:00 in the morning because you can't take down your repository when your developers are busy using it.
Upvotes: 0
Reputation: 4041
The only solution is to filter your repository on server side. You should use command like this:
svnadmin create /path/to/newrepos
svnadmin dump /path/to/repos --incremental | svndumpfilter excdlude path/to/remove | svnadmin load /path/to/newrepos
Upvotes: 0
Reputation: 878
SVN provides a command called svndumpfilter
that allows you to dump your repository and exclude a path from it. Then, load that dump file into a new repository and that file will be gone.
svnadmin dump /path/to/repos > dump.file
svndumpfilter exclude path/to/remove < dump.file > newdump.file
svnadmin load /path/to/newrepos < newdump.file
Upvotes: 1
Reputation: 692181
I think you'll have to
Upvotes: 1