We would like to decrease the size of a repository by purging all binary files usually zip files that are not development oriented. Any easy way to remove them?
We would like to decrease the size of a repository by purging all binary files usually zip files that are not development oriented. Any easy way to remove them?
i assume you wnat to decrease size of repository [ on the server ], not just content checked out.
as far as i know only way to remove something permanently from svn is to:
in this way you'll preserve history and all meta-data yet you'll get rid of unwanted files [ eg binaries ].
Unfortunately, no.
There is currently no simple way to completely remove files from a SVN repository. This feature (usually called obliterate), has been requested since 2001, but it is not yet implemented. See the bug report for all the details.
The workaround for the moment is to dump the repository, filter the dump, then reimport. This is explained in the standard book, Version Control with Subversion.
The best way to prevent people checking in files you don't want is to use the pre-commit hook. Reject (ie return a non 0 value) if any of the files in the commit match a pattern. The user will receive the message when they try to commit. You can set the global-ignores, but that only applies to the client, if a client is installed without setting the ignores, they will happily attempt to checkin whatever they like.
eg. (using windows batch files, you'll be better off with perl) to restrict specific file extensions, and return the bad files with a message to the user:
Where ignore-matches.txt is:
You can also prevent users from adding binary files by ignoring them you have to edit ~/.subversion/config and look for global-ignores. If the line is commented, remove the pound character.
so you can add what you want i used it to keep my repository clean from mac os temporary files.
Hope that will help you.