Subversion Integration

One of Blueprint's core features is tight integration with the version-control system Subversion. In fact, Blueprint wouldn't make much sense without Subversion. If you've never used version control before, then some of the darker corners can be hard to fathom, but its basic principles - shared, by and large, by all version-control systems - are fairly straightforward:

  • You check in your site regularly during its development, and these check-ins are stored as discrete versions in your repository (hence the generic term 'version control').
  • Only changes are committed to the repository - that is, you don't have to wait for your whole site to upload to your repository every time you check in a minor change. But if you check out any version of your site, it will contain the complete site up to that point.
  • If you break something in your most recent version of a site, you can effectively go back in time and restore individual files, whole folders or the whole site from any version stored in your repository.
  • Other members of your team can check out a copy of your site and work on it at the same time as you are. They can then check in their changes, under a new version number, for you (or other members of your team) to check out when the time is right.
  • Conflicts - that is, instances where two or more team members have edited the same section of site code, such that both sets of code can't co-exist – can be managed by explicitly accepting or rejecting code that's in conflict with your own, or by inspecting the conflict and manually correcting it. You'd be surprised by how rarely conflicts of any kind occur.

If you're a developer or designer using Blueprint to manage a number of sites, chances are you'll have a single repository for all your Blueprint sites. We'll refer to that throughout this documentation as your Sites Repository. It will look something like this:

(image of sites repository directory structure).

How you configure your repository is up to you, and you can use any number of server-side or desktop GUI tools to browse it - none of this is Blueprint's domain. What Blueprint does do for you is give you a set of rake tasks (link this) which automate the main interactions with your repository. Most rake tasks are executed from the command-line - you need to cd into your Blueprint directory to make them work.

Key version-control rake tasks

  • rake site:specify is the rake task for creating a new site, or changing the details of an existing one. It requires a domain argument, and can optionally take the new_domain argument, if you're wanting to change the domain of the site. When you create a new site, the site:specify task does the slightly fiddly work of making an initial check-in to your sites repository and configuring your local copy so that it's ready to make future check-ins. If you use the new_domain argument, this task will rename your site folder in the repository as well as on your local computer.
  • rake site:templates:sync (with a domain argument), synchronises your local site templates with those in your sites repository. First, it checks in the changes you've made, and then checks out any changes that others may have checked in for that site since you last synchronised. If there are conflicts, you're given options for addressing them: overwrite the templates with your versions, overwrite your templates with those in the repository, or deal with conflicts later - basically, this last option checks out several versions of the code so that you can compare it and make changes by hand.
  • rake site:templates:update domain="" updates your local templates from the repository without checking in any of your recent changes. Use this task to grab changes made by your co-workers in cases where your own version is still in flux.
  • rake site:data:push domain="" creates a backup of your local database for that domain (ie, all the content, including the site structure and any settings, as well as any assets like images and documents you've uploaded via the Blueprint interface) and checks it in to the repository.
  • rake site:data:pull domain="" overwrites your local content with whatever's currently stored in your repository. Be careful with data:push and data:pull!
  • rake site:retrieve domain="" grabs the most recent data and templates for any site from your repository, overwriting your local copy (if one exists) in the process.

User notes

(You can add notes to this page using the form below.)


Only the note field is required.

Preview or