tags:

views:

117

answers:

5

Hi guys,

is there a commend to delete project from svn with all its revisions(total cleanup) ?

cheers

A: 

rm -rf on the repository usually works fine.

che
what about internal svn db ?
Marcin
I was living under the impression that svn keeps its database somewhere in the server repository, so nuking the repository will get rid of it as well. I might be wrong though.
che
+1  A: 

No, I don't believe there is.

If you really need to remove files completely from SVN history, I think the only way to do it would be to do something like dumping the repository, filtering out the files you don't want with svndumpfilter, and then recreate the repository from the dump.

Why do you want to do this?

therefromhere
I have a project which I would like to completly remove from my repo.
Marcin
+6  A: 

The answer is in the Subversion FAQ:

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.

Tomislav Nakic-Alfirevic
thanks for that, here is a good article about it: http://blog.projectnibble.org/2008/03/01/subversion-obliterate-the-forgotten-feature/ cheers
Marcin
A: 

this is how to do this on Linux:

/>svnadmin dump /path/to/repos > proj.dump
/>cat proj.dump | svndumpfilter exclude somefolder > cleanproj.dump
/>service svn stop
/>BACKUP /path/to/repos/conf /path/to/repos/hooks (all custom configuration for this repository)
/>DELETE /path/to/repos
/>svnadmin create /path/to/repos
/>RESTORE /path/to/repos/conf /path/to/repos/hooks
/>svnadmin load /path/to/repos < cleanproj.dump
/>service svn start

done

Marcin
A: 

I'm assuming that you are talking about multiple projects under the same repository:

myrepo/
      project1/
      project2/

If you simply want a project to 'disappear' without screwing with the repository history, you can simply hide this path if you are using an authentication mechanism that utilizes authz. In other words, you are not using 'svn+ssh' to access the repository.

Let's say I already have a group in my authz called 'everyone'. The in my authz I will set something like:

[/project1]:
    @everyone = 
MattK
I would like to have it deleted not hidden, thanks.
Marcin