tags:

views:

94

answers:

5

I want to remove all stored revision info, except for the most up to date version (in an effort to safe space). Is this possible?

+3  A: 

Export the latest working copy, then import the result into a brand new repository. You might not save that much space, though, due to the way svn stores revisions.

Marcelo Cantos
+1  A: 

Not directly. What you'd do is:

  • Check out/Export the latest revision.
  • Create a new repository.
  • Import the checked out version into the new repository.
  • Switch the old repository with the new one.
nos
+2  A: 

If you can, the arguably easiest way is to export the current version, delete the repository, and set up a new one.

For anything more complex, there is svnadmin dump that can dump specific revisions and revision ranges: Manual

Pekka
+3  A: 

Would it not be easier to check out an up to date copy of the project, wipe the repository and use your checked out copy as the basis of a new repository.

Amos
That's what I do. If you really didn't want the previous revisions at all.
Finglas
+2  A: 

In almost all possible scenarios, HD space is nowadays cheaper than the time you waste now fiddling with this or later trying to find out why/when some function got implemented the way it is without its history. So unless you have a lot of time at hand, but really cannot spent the small amount a 1TB HD costs nowadays, you'd better be off leaving the repository the way it is.

It might be different if you put very large binary files into your repository which frequently change so completely that even the diffs stored per changeset are to big. If that's the case, you might want to consider eliminating just those files from the repository. There are a few questions here on SO dealing with that. Here is an example.

sbi