tags:

views:

189

answers:

2

I want to know for how long the tortoise svn keeps the revision history. Say I have a file which I deleted from repository through repo browser an year ago, will I be able to still recover that file?

If I am able to recover, I also want to know the method to permanently delete that earlier copy of file and related revisions history so that in future nobody is able to access that file. Is it possible? I have run into problems in my organisation as I did frequent updations and deletions assuming that file was getting deleted permanently. The file system of repository has bloated now. Please suggest how to fix it.

+1  A: 

http://svn.haxx.se/users/archive-2005-05/1040.shtml

There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, because Subversion is deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies. The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue 516.) In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 of the Subversion book for details about this.

From http://subversion.apache.org/faq.html#removal

Svisstack
It says we cant delete a file permanenly. Is there any other way?
rahul
It's hard to do.
Svisstack
Is there any easy way? I dont understand what is he talking about pipe, dump...etc
rahul
Not have easy way.
Svisstack
+2  A: 

Tortise SVN is really just an easy way to access a Subversion repository. To quote the Subversion FAQ on how to remove a file permanently:

There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, because Subversion is deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies.

The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue 516.)

In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 [ed: changed link] of the Subversion book for details about this.

Essentially, you're packaging the entire repository into a single file, running a command to remove all references to a given path from that package, and then turning that package into a new, different repository. Swap the old one in for the new one on the server, and you're good to go.

Except, as it mentions, all your client's working copies will probably be invalidated. And this does require being able to access the server. You are running your own SVN server, right?

Karmastan