We all have the Drupal projects we work on that ought to be under some sort of version control system but aren’t. There are many reasons why this might be the case: the small size of the project, the lack of central version-control infrastructure, or the annoyance of “.svn” or “CVS” directories littering your working copy.

With Bazaar, none of these excuses should prevent a project from having solid version control.

Here’s why Bazaar avoids those problems:

  • It requires minimal effort to bring code under control.
  • Bazaar does not require (but still supports) centralized infrastructure.
  • A single .bzr directory at the root of the project contains everything Bazaar needs, minimizing disruption.

Bringing a Drupal project into Bazaar

Note: If you want to automate your Drupal updates, you may want to branch from the Four Kitchens repository instead of initializing your own branch. Branching from the Four Kitchens repository is more time consuming, but it’s worthwhile for large projects.

  1. Install Bazaar.
  2. Go to the root directory of your project.
  3. bzr init
  4. bzr ignore ./files # Drupal 5 only
  5. bzr ignore ./sites/default/files/ # Drupal 6 only
  6. bzr ignore ./sites/default/settings.php
  7. bzr add
  8. bzr commit -m “Initial import”

That’s it! Learn to use Bazaar and enjoy powerful version-control capabilities for even your smallest projects.