alistairphillips.com

I’m : a web and mobile developer based in the Manning Valley, Australia.


SVN

Subversion is a revision/version control system allowing one to maintain historical versions of files which might include documentation, websites or source code.

I've had to perform a few command line actions on my hosting provider, site5, and these are recorded here for ease of reference.1

One thing that I'd like to look into a bit more is svn:keywords which can be used to substitute variables in files with, for example, the current version number of the file.

Commit files will be done using

    svn commit --message "descriptive reason for the changes"

If you need to exclude certain items, such as cache or temporary files, then you'll need to make use of the svn:ignore property.

Sample:
    svn propset svn:ignore "file_to_ignore*" /path/to/folder/

Example call:
    svn propset svn:ignore "zend_cache---*" .

If you're adding folders and want these to immediately be added to the repositry and later committed using svn commit use

    svn mkdir directory

Ideally when doing a deployment you should be able to access the code from the SVN server. Now instead of doing a SVN checkout which will include a .svn folder in each folder you should use

    svn export /path/to/repo

Remove all .svn folders in a directory tree

find . -name ".svn" -exec rm -rf {} \;

  1. The free SVN book is a great resource for more indepth svn usage