Showing posts with label bazaar. Show all posts
Showing posts with label bazaar. Show all posts

Thursday, April 2, 2009

Bazaar Upgrade

The upgrade to Bazaar 1.13.1 broke the Trac-Bzr plugin and of course Tom's Project Utility. I found a fix for my program quickly which was a bit surprising. So far haven't had the same luck with the Trac-Bzr plugin. I doubt the problem has gone unnoticed, since Trac crashes hard when you try to browse the source repository. This isn't a subtle bug.

Of course, I only discovered the problem because I needed Tom's Project Utility to create a new personal project. Its an absolute truth that software which is never used, can never fail. ;-)

Sunday, January 11, 2009

Bazaar API

I've been poking around in the Bazaar API to learn how I could create repositories from my TomsProjectUtility program. The easiest way to do this would be to simply run the bzr utility in a sub-process, but what fun would that be? Since my program and Bazaar are both written in Python, I felt it would be more interesting to use the Bazaar API directly. Running a Bazaar command is easy. Each command is a class with a run() method with takes the same arguments that you pass on the command line.

Writing a unit test for my application code proved more challenging. My first attempt used the equivalent of a "bzr check" command but it does not provide enough detail for a complete test. I had to make sure that my application creates a Bazaar shared repository as well. I had to dig a little deeper in into how "bzr check" works to figure out how to test for the shared repository but it was worth it. I now have everything that my utility needs to create the Bazaar repository automatically.

Unfortunately, I ran out of time today so actual implementation will have to wait a little longer.

Thursday, December 11, 2008

Bazaar

I've been using the Bazaar version control system for all my projects for a while now. I'm not sure why I chose Bazaar. It is not the best one by any standard but it feels like it is the right one. Not a very technical reason, I know. I think the clincher was that Bazaar versions directories, whereas the competition (Mercurial, Git) did not the last time I checked. Its funny how that simple capability seemed to be important.

I want to create a Bazaar repository from a utility I wrote, called TomsProjectUtil. (It is hard to come up with good names!) The utility creates project environments based on Trac, Bazaar, and PostreSQL, and Apache. Currently the Bazaar repository must be created manually and I would like to to automate that step. The obvious method is to run the bzr program in a sub-process but, since both programs are written in Python, I can hopefully call hooks inside Bazaar and avoid starting another interpreter. I've only just started investigating how to do this, so it is still a work in progress.