Subversion – Rules, Crash Course and Work Cycle 09Jun, 2010


Rule #1: Check in only completed functioning code that you believe works. Bugs may be found later, but don’t check in anything that you know is incomplete or broken.

Rule #2: Check in as often as possible without breaking rule #1.

Rule #3: Always perform an update before a check-in.

Rule #4: Reference the svn red book often.

Rule #5: Do not mess around with the .svn directories in the check-out unless you’re an expert with subversion.

Subversion (svn) is a source code repository like microsoft sourcesafe, cvs, or borland starteam. The main repository we use is called simply ‘main’. Beneath main, everything is organized into projects. There is a project for the main website itself, called ‘webroot’. Each project is organized into branches (created at release), and “trunk” where development occurs.
There are a few main functions to svn that you need to be familiar with.

  1. Checkout – This is how you get a copy of the project.
  2. Diff – Use this before commit to make sure you are only checking in things you intend to check in.
  3. Commit – This sends your changes to the server, this is how you check in.
  4. Status – This will list which files are changed or new.
  5. Add – Use this to add new files you create to the repository. Must be followed by a commit.
  6. Update – This brings down any changed files. It will attempt to merge, and warn on failure, if a file on the server has been changed since the last time you ran an update, and your local copy is modified.

Again, read the red book.


  1. Checkout the project.
  2. Modify files and test modifications.
  3. Update.
  4. Any new files or directories need to be ADDed.
  5. Update.
  6. Repeat 2-4 until your changes are ready to be sent up.
  7. Commit.
Posted by: Admin / In: SVN and Tagged , , ,