It’s taken me about a day of fiddling about to finally get Redmine to work with my Bazaar repositories.

This is the first time I’ve ever used Redmine (as well as Rails), so much Googling was required.

The Problem

I was trying to add a Bazaar shared repository (consisting of trunk and some branches). This failed as it appears that Redmine does not yet support Bazaar shared repositories. Because of this, I have only been able to setup trunk (which isn’t a problem really, as I’m not using branches yet).

This worked fine for a while - I could view the revision history and view the files themselves.

Then - the next day - it stopped working. The revision history was gone, and so were the file listings.

I tried creating test Bazaar repositories and changing the path in the Redmine project settings, but to no avail.

Today I discovered I needed to run ruby script/runner "Repository.fetch_changesets" -e production which thankfully restored the revision history, but not the file listings. I was under the impression that the Autofetch commits administrative setting would have done this whenever the repository was viewed.

After much Googling and a brief moment of hopelessness, I stumbled upon the solution.

The Solution

I had to add the following lines to config/environment.rb (and restart redmine):

ENV['PYTHONPATH'] = '/home/vxnick/lib/python2.5'
ENV['PATH'] = "#{ENV['PATH']}:/home/vxnick/bin"

Note that I am using WebFaction, so the paths above may vary based on your server environment.

At the moment, everything is working as it should - revision history is there, and I can view my source files. Hopefully everything will stay as-is, however I may have to setup the ruby script/runner ... line as a cronjob if it breaks or doesn’t update when I commit to the repository.

Apart from that problem (and the lack of built-in TLS support for mail), Redmine is a nice system for managing projects.