Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Freeing up space in my SVN repository

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?

like image 704
fbrereto Avatar asked Oct 03 '10 06:10

fbrereto


People also ask

How do I delete everything from svn?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…

Does svn compress?

By default, SVN uses compression level 5 (on a scale from 0 to 9). If you primarily store binary files that don't benefit from compression, or you have a fast connection, this might be a win.

What is pristine folder in svn?

svn repository contains a directory called "pristine". The pristine directory contains the original versions of the files from the repository so that subversion can compare them to the current files. The files in the pristine directory are stored with a filename set to the checksum (usually SHA1) value of the file.


3 Answers

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.

like image 82
Version Control Buddy Avatar answered Oct 15 '22 01:10

Version Control Buddy


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

like image 6
Naveed Avatar answered Oct 14 '22 23:10

Naveed


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
like image 3
pyfunc Avatar answered Oct 15 '22 00:10

pyfunc