Managing Code Between Repositories

One of the processes I go through almost every day at work is deploying our code base to the test (or sometimes the production) server.

We use SVN for our version control, and we have 3 different branches.  “dev” which is the main development branch.  This is where I commit all the changes I am currently working on.  “test” contains the code on the test server.  This is where my boss/co-workers test all new features/fixes.  “prod” is the main production server where the main app is running.

After committing code into “dev” and testing it on the dev server that I was working on, I merge the revision(s) with the “test” branch.  I use a program called TortoiseSVN.  I just right-click on the folder containing the checked-out “test” branch, and select “merge”.  From there I can pick the revision(s) I want.  Then I commit them.

On the test server (via SSH), there is a script that I run that will copy the code from the SVN into the webroot.  From there, it sends out an email to notify our team that there are new changes to test out.

The production server works exactly the same way.  Merge, commit, then run deploy script.  It’s fairly automated, and I don’t really see how it could be anymore automated.  Having to manually merge/commit might be annoying, but it’s the safest way.  It makes sure you only run the commits you want.  It makes sure that you know *exactly* what code is being moved into each server.

It’s a process I’ve gotten used to, so it’s easy and quick for me to do it.

-Eric aka ens3261

Advertisements

About nticompass

Web developer by day, sleeping by night. Also ponies.