简体   繁体   中英

Tortoise SVN revision history

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.

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM