Skip to Navigation

Subversion Checklist

Printer-friendly version

We recently rolled out a new version control process, which we feel will better support our increasing project complexity.

Previously, our live sites used trunk, and our work took place on a single dev branch. This was problematic because it was sometimes difficult to separate the tested-and-ready-for-live code from the code still in development.

Now, we use multiple branches (one for each major enhancement and/or batch of bugfixes), and tag any finished changes. Tagging takes the guesswork out of figuring out what code is ready for live. When we need to cutover some changes, it's now as simple as switching to the newest tag.

Initial Buildout

  1. Checkout a copy of trunk into your local working directory:
    1. svn checkout svn+ssh://path/to/project/trunk project
  2. Develop. Commit often. When the functionality is complete, create a branch:
    1. svn ci -m "Committing trunk changes"
      
    2. svn copy svn+ssh://path/to/project/trunk svn+ssh://path/to/project/branches/1-0-x
  3. Switch to the new branch:
    1. svn switch svn+ssh://path/to/project/branches/1-0-x
  4. Test. When finished, tag your new release:
    1. svn copy svn+ssh://path/to/project/branches/1-0-x svn+ssh://path/to/project/tags/1-0-0
  5. Merge the branch back into trunk:
    1. svn switch svn+ssh://path/to/project/trunk
      
    2. svn merge ^/trunk@HEAD ^/branches/1-0-x@HEAD
    3. Resolve any conflicts. Merging can sometimes be a tricky and time-consuming process. When in doubt, ask for help. There are also several GUI tools to make merging easier. Beyond Compare 3, WinMerge, and TortoiseSVN are some choices for Windows.
  6. Commit the merge
    1. svn commit -m "Merged branch 1-0-x back into trunk"

Bugfixes

  1.  Switch to the latest branch number:
    1. svn switch http://path/to/project/branches/1-3-x
  2.  Develop, then test. When finished, tag your release with the next minor version:
    1. svn copy svn+ssh://path/to/project/branches/1-3-x svn+ssh://path/to/project/tags/1-3-2 
  3. Repeat steps 5-6 of Initial Buildout.

 New Features

  1. For major, long-running development that needs to happen simultaneously with smaller feature development, consider adding a new feature branch. Otherwise, work on trunk.
  2. Repeat steps 1-6 of Initial Buildout, remembering to update major version numbers (e.g. branches/1-1-x).
  3. As a good practice, make sure to do svn update before doing any commits.

 Updating the Live Site

  1. Switch to the latest tag:
    1. svn switch svn+ssh://path/to/project/tags/1-1-0

 

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.