Bazaar is a great, it has excellent documentation on a very well designed website, it’s incredibly easy to use (one of its design goals) so you can focus on what’s important (coding), it has support for both distributed and centralized workflows, it supports pushing and pulling from SFTP servers that do not have bazaar installations, and it uses revision numbers (instead of hashes), and it does so in a very intelligent way.
Unfortunately the latest version doesn’t seem to come in a tidy OS X Installer package, nor is it available via MacPorts (yet), so here are some tips to install it from source.
If you’ve previously installed Bazaar using the package installer you’ll probably want to clear out some of the files it installed prior to installing the new version:
cd /Library/Python/2.5/site-packages sudo rm -rf bzr* sudo rm -rf Loom-1.4.0dev0-py2.5.egg-info sudo rm -rf subvertpy* sudo rm -rf Extmerge-r10-py2.5.egg-info sudo rm -rf qbzr-0.9.9-py2.5.egg-info # we'll install the latest versions of these in a bit sudo rm -rf BzrTools-1.14.0-py2.5.egg-info sudo rm -rf pycrypto-2.0.1-py2.5.egg-info sudo rm -rf paramiko*
We do that to avoid conflicts and because we want to install these plugins ourselves, so that we can use the latest versions.
Because of the way we’re installing Bazaar, you should install BzrTools *after* installing Bazaar 1.16 (detailed below). Installing Paramiko and pyCrypto is simple though, as you only need to download Paramiko (its installer will grab pyCrypto for you):
- Grab the latest version of Paramiko, as of this writing it’s 1.7.2:
- Extract the contents of the archive and ‘cd’ into the directory
- To build and install run these commands:
python setup.py build sudo python setup.py install
Optionally, the InstallationFaq suggests installing Pyrex to speed things up.
Installing Bazaar 1.16
python setup.py build sudo python setup.py install --home /usr/local sudo mv /usr/local/lib/python/bzr* /Library/Python/2.5/site-packages/
Note: On Snow Leopard the default Python install is 2.6, not 2.5.
Installing Bazaar Plugins on OS X
This too isn’t very clear from the Bazaar Plugins page. To install a plugin follow these steps:
- Pick a plugin from the plugins page and grab its branch URL, for example the URL for Rebase is:
- In some directory run:
bzr branch [branch-URL]
- That will download the plugin source. ‘cd’ into the directory, in the above example it’s “trunk”.
- Build and install the plugin using the same commands as you used to install the dependencies.
That should do it. One note is that a lot of the plugins are hosted on launchpad, in which case grabbing them is simple (using ‘bzr-search’ as an example):
bzr branch lp:bzr-search
Now you can enjoy the benefits of running the latest version. 🙂