How to delete the contents of a folder in SVN

1.5k views Asked by At

I need to delete a folder's contents in tortoise subversion. So basically the developer loaded up 30gigs of data in the trunk of the project for a test and now wants to delete the all of the contents of this folder and not keep any of these data for retention.

So would I use this command and is this the Correct Syntax: svn delete something.com/svn/prod/WHOtest/trunk

Then commit and then just recreate the folder and commit again?

4

There are 4 answers

2
Unni Kris On

I dont think you can permanently delete the contents through svn. Even if you delete the content, its svn history will be always there.

I think you will have to manually delete the content from the server.

1
Jason Sperske On

Svn delete will record that at one point you no longer want to track the contents of a file or folder. This will not remove it from the history however. There is some experimental work on deleting from history but I don't know the status of this. The only sure fire way to remove a point in time is to rebuild the svn repo from scratch. Now you could snvdump everything up to the point before the 30 GiB commit and then try and implement the patches after the offending commit. I don't envy the person who has to do this. Maybe you can make the person who did this fix things (assuming you still trust them to do the right thing)

0
Maxime On

There is no obvious nor clean way to do this. Indeed, the so called Obliterate method is not implemented.

You can find some answers here and there though.

Bye !

0
Filburt On

Adding to Jasons answer: svndump everything up to the point where the 30 GiB commit happened

  1. Backup your current repository

  2. svnadmin dump -r1:125 myrepo > my.dump where 125 is the revision before the 30 GiB commit

  3. remove and re-create your repository

  4. svnadmin load myrepo < my.dump to load the clean dump.