Subversioneering

December 23, 2007

Version control with CVS or SVN is widely used, and in many personal ways. But clearing out that personal way can be quite frustrating and time consuming. Therefore, I would like to sketch up the setup that has worked best for my concern.

  1. I do all the development on my own PC, running a local webserver/database (xampplite is a fantstic package for a typical PHP/mysql environment) and eclipse with suitable plugins.
  2. As new code runs smoothly, I commit the files to the sentral repository using TortoiseSVN right from the Windows explorer. To aviod typing the server password every time I interact with the repository, I’ve found a cute tip from Hile’s blog.
  3. Ok. The new code is committed, and I want to see the changes live on the server. To automatically update a working copy in the public_html/ folder on the server, I use a post-commit hook. The repository/project/hooks/post-commit may look like this:
    /usr/bin/svn update /home/myuser/public_html/project_test
    exit 0

    Remember to enable execute-premissions for the apache user (www-data) for the whole path to project_test, and to have the full path to the svn command.

One Response to “Subversioneering”

  1. Kim Joar Says:

    Nice to see that you are spreading some of your knowledge! Personally I am working on finding a system for version control that works perfect for me, but I haven’t really found one yet…


Leave a Reply