version control: no more save as…

Version control can save your life and make you happy.

Presenters
Matt Mullenweg – Automattic/WordPress
Karen Nguyen – Yahoo!
Zach Nies – Rally Software Development
Joe Pezzillo – joepezzillo.com, @metafy
Derek Scruggs – SurveyGizmo
Date
Sunday, March 15
Sites
phpadvent article
trac
cornerstone
versions
Beanstalk
mecurial


Teams

Fosters a collaborative environment: when you are working on the same files, multiple people could step on each other’s toes. Branching and merging lets you work on your own and then bring something unique back to the main project.

Bits and Bytes

Version control has always been a little scary because of the command line format. Three words really matter when it comes to version control:

  • Update – applies latest changes from the repo to your local working directory
  • Status – shows you what has changed in your local working directory
  • Commit – applies your local changes back to the repo

VC allows you to work on non-live servers, get it working, and push a fix out to a live server only when you know it is working. You can also rollback to a previous version.

Tools

Version control is built into many web dev systems (xcode, coda, dreamweaver), as well as some third party tools: cornerstone (gui with a timeline, filemerge-like comparisons), versions (easy to set up/use, beanstalk integration). Beanstalk (remote hosted repository, integrates with basecamp, fogbugz, lighthouse, twitter).

Git – vc with branching made easy, gitx, github, social coding, fork central, gists

Branching may be good for maintaining a pro version or lite version, mu version vs. normal.

mecurial (Hg) – distributed version control, bitbucket.org

Binaries, Company Size, Cross-repo dev

No negatives to putting binary files into repositories. You can be guaranteed that you are working with the same version of the file.

In small companies, developers often drive the decision to use version control due to familiarity and specific needs.

Large companies, there is usually a version control culture already in place.

Multiple version control repo types with multiple groups causes delay and problems. Time is money, so you should find something that is easy for IT, QA and dev teams to use. It should provide security and disaster recovery. It should be cost effective (would putting some money into it save money later?). Can you get great reports of how you are using vc, and does the vc repo have a high adoption rate? What is administering a vc repo like? The downside to switching to a single vc repo (if you have multiple now) is a high IT cost for infrastructure and migration. Developers feel switching would impact productivity during migration due to reconfiguration, etc. QA usually doesn’t get a chance to check things out since there really can’t be any dev downtime for vc repos.

Cool Things (yay matt!)

Matt decided to show a live version commit to wordpress.com.

  • svn diff
  • deployment system to multiple production servers (deploy), svn makes it easy.
  • post commit hooks (svn email, trac)
  • sparse checkups
  • sync multiple computers and backup your svn repo (snapshots)
  • automate checkins for a backup-like situation, break things up into multiple commits

Hosting

The providers make it easy to get going quickly.

Branching

Love it or leave it? Version control is a channel of your development processes. Branching tends to slow down the project, and really is only useful when you are starting over from scratch.

There were a lot of great questions at the end with awesome information, like WordPress’s deployment strategy, but I ran out of power and was too comfortable to go find an outlet. Sorry!

These are notes from a session at sxsw interactive. My own take on topics are mixed in with what the presenters were actually saying, so do not assume all of this content is my own.