views:

122

answers:

2

We are looking to do two things:

  1. Set up an offline web test platform, and
  2. Implement version control with SVN.

The posts I've seen suggest the SVN repository should exist as a separate data store from the test and live platforms, probably on a different server.

Can anyone point me to articles/posts on how to properly stage code between the repository, test and live environments?

A primary concern is keeping test and production code in sync so testing only shows changes to the live code as replicated in the test environment.

A: 

In our office we use a local developement server which has Trac, SVN and personal subdomain divided developement areas. Every developer has his/her own subdomain for each project and every project has their own SVN repositories.

We have a "sync day" which everyone "commit"s their changes, and everyone "update"s their own directory which means everyone gets the last version and then we start testing.

After being sure that everything is OK, we "tag" the latest revision as "stable" and sync this version with a little bash script using lftp.

Hope this helps.

BYK
+1  A: 

The actual hosting of the SVN repository is really independent of any other infrastructure you have. Usually the repository is hosted on an internal "production-grade" machine, since the source code is your life-blood.

The simplest approach to handling test-staging with SVN is to just tag the version you push onto your test-server. If you're satisfied with the test results you can push the tag to the live server with impunity. And, if you ever have to make a minor bug-fix on the current live version, you can create a branch from the tag and commit the fix there, again deploying first to the test, the to the live system.

For more complex scenarios, you might want to create "test" and "live" branches, which merge and/or cherry-pick changes from trunk. This is only possible with subversion 1.5 or later and needs someone who takes care that "live" has all the right changes from "test" and "trunk".

David Schmitt