Distributed version control provides a streamlined alternative to vendor branches

Anyone who’s worked with a sufficiently large project eventually ends up establishing vendor branches to track and merge upstream releases. Maintaining these branches is time-consuming, redundant work because everyone who needs a vendor branch of a project needs approximately the same thing.

With centralized version control tools, you have two choices:

  • Apply patches integrating the changes from upstream releases. This approach avoids the need to set up vendor branches, but it will not allow three-way merges, increasing the developers time spent resolving conflicts. Patches also cannot represent many types of changes, requiring more manual work to upgrade.
  • Download, extract, and commit each upstream release to your project’s own vendor branch. This is also time consuming and requires regular work checking for upstream releases. It does, however, allow three-way merges and applying all types of changes.

Distributed version control systems, like Bazaar, allow you to branch your project from a remote “vendor” branch, providing all the advantages of a local vendor branch with none of the headaches. Moreover, tools like Bazaar track the last merges from remote vendor branches and automatically apply changes made since your last merge.

For Drupal, Four Kitchens maintains vendor branches of stable Drupal 5 and 6 releases:

  • bzr://vcs.fourkitchens.com/drupal/5
  • bzr://vcs.fourkitchens.com/drupal/6

We also maintain vendor branches for Pressflow:

  • bzr://vcs.fourkitchens.com/pressflow/5
  • bzr://vcs.fourkitchens.com/pressflow/6

Branching from these allows you to upgrade your project with a simple “bzr merge [vendor-branch-url]”. The popular vendor branch URLs are shown above.

Comments

I downloaded drupal 6.6 from the drupal website, and bzr init, bzr add and bzr commit. However, after running bzr merge --revision=1 bzr://vcs.fourkitchens.com/drupal/6 I got this error:
bzr: ERROR: Branches have no common ancestor, and no merge base revision was specified.Any idea?

I made some changes to the “existing project” directions, but I’ve removed them until I fix an issue related to spurious conflicts from content ID mismatches.

It turns out your situation is rather complicated.

It would seem that you didn’t branch from the main branch eg bzr branch bzr://vcs.fourkitchens.com/drupal/6 , but you created an unrelated branch using bzr init

Accurev streamlines the software development release process using a technology far superior to branches.

There is a 2 minute demo and a longer one if you’re interested in learning about the next generation of commercially available version control that goes well beyond just handling merging and conflicts more frequently and elegantly that other tools:

http://www.accurev.com/accurev.html

Contact Four Kitchens

Download Pressflow

Pressflow makes Drupal scale