Subversion admin tasks

07th Mar, 2011 | svn unix

Stripping out all subversion files from a filesystem. Do this before moving content between filesystems under version control or final packaging:

find . -type d -name ".svn" | xargs /bin/rm -fr

Getting subversion to ignore files

This ensures files that are not part of the working copy are no automatically added in some IDE's or listed in svn status

First ensure your shell is using a sensible editor, like vi

# Ensure this is in your .bash_profile or .profile

export SVN_EDITOR=vi

Now cd to the directory where the file is located.

Run the propedit command passing the property to edit, svn:ignore and the directory to work on - '.' for the parent directory

svn propedit svn:ignore .

And list all files to be ignored for that directory. Not paths do not work, only filenames. In other words you cant list all the files as paths in the root directory of the site.