Bazaar

Bazaar

 




Wiki Tools

  • Login
  • Create Profile
  • FindPage
  • RecentChanges
  • Page History
  • Attachments

Using Bazaar Plugins

A plugin is an external component for Bazaar that extends the revision control system, by adding or replacing code in Bazaar. Plugins often work as a way for developers to test new features for Bazaar prior to inclusion in the official codebase. Plugins can do a variety of things, including overriding commands, adding new commands, providing additional network transports, customizing log output. The sky is the limit for the customization that can be done through plugins. We have focused on the plugin architecture to ensure that Bazaar has the most comprehensive plugin system of any revision control system.

Where to find Plugins

We keep our list of plugins on the BzrPlugins page. Feel free to add your plugin there.

Writing a plugin

Information on writing a plugin is found on the WritingPlugins page

Listing the installed plugins

The command is "bzr plugins". That will show the plugins installed and the locations they are being loaded from. (The version of each plugin may be added as a future enhancement.)

How to Install a plugin

Installing a plugin is very easy! One can either install a plugin systemwide or on a user by user basis. Both methods involve creating a "plugins" directory. Within this directory one can place plugins in subdirectories. For example, "plugins/bzrtools/".

Two locations are currently checked; the bzrlib/plugins directory (typically found in /usr/lib/python2.4/site-packages/bzrlib/plugins/) and $HOME/.bazaar/plugins/ (on windows $APPDATA/bazaar/2.0/plugins).

If you want to install a plugin into your .bazaar/plugins/ directory, just move the extension directory in there and then run python setup.py build_ext -i.

One can additionally override the home plugins by setting the environment variable BZR_PLUGIN_PATH to a directory that contains plugins. The installation of a plugin can be checked by running  bzr plugins  at any time. New commands can be seen by running  bzr help commands .

<!> Since Bazaar 0.15, the plugin folders may not contain a dashes like bzr-gtk. In stead rename such plugin directories to something without a dash eg. gtk.

Tip for developers

If you are tracking the "tip" of Bazaar, using the cutting edge development version and keeping it up to date, then you can easily do the same with most of the plugins. For example, to install the bzrtools plugins for your main user account, one can perform the following:

bzr branch http://panoramicfeedback.com/opensource/bzr/bzrtools ~/.bazaar/plugins/bzrtools

After doing this, you can update the bzrtools plugin to its tip at any time with:

cd ~/.bazaar/plugins/bzrtools; bzr pull; cd -