Freeing up space in my SVN repository

9.7k views Asked by At

I have an SVN repository hosted on a freemium site with a maximum repository size. As I approach this capacity I am aware of files I've checked in that I know I can remove permanently to free up disk space. How do I tell SVN that a file can not only be deleted, but it's history as well?

3

There are 3 answers

0
Version Control Buddy On BEST ANSWER

I don't think there is a way in subversion to tell not to version a particular file or at least forget about a file when deleted. As it defeats the purpose of version control system. you will be able to achieve this by some tweaks if you have a local repository. However without any admin access for the repository, its going to be impossible to do this.

If it helps, rsvndump is a tool to take a dump of a remote repository. With this you will be able to get the repository dump to your local system. To remove the unwanted files you can use this command "cat xxx-svn-dump | svndumpfilter exclude $file > new-svn-dump". Although with this you can reduce the size of the repository, you will not be able to update the orginal repository with this content.

0
Naveed On

Look at this:

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

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.

Possible solution in this SO answer:

Delete file contents from SVN history

0
pyfunc On

Also you can prune your history. Say you have 100 revisions, you can keep the latest history, say 50 revisions. This may also reduce the size of your subversion repository.

svnadmin dump /path/to/current/repo -r50:100 > newsvn.dump
# you can delete the old repo and then
svnadmin create /path/to/new/repo
svnadmin load /path/to/new/repo < newsvn.dump