Git-bz: Integrate Bugzilla and Git

I am trying to seek solutions to integrate bugzilla and git. One of the elegant solution is to the server side git hook, Gitzilla, which depend on Python interface to Bugzilla – pybugz. However, Gitzilla is lack of updates for 4 years and not seems to be a dependable solution for me. The last commit of Bugzilla is on Aug 16, 2011. And the Gitzilla compatible version is still 0.9.3, while the latest release of pybugz is 0.11.1.

Another solution is to use email system of Bugzilla by integrate with git-notifier. But the configuration process need a lot of manual hack on multiple component.

My final selection is to use git-bz – a heavily used solution in Gnome. It works on the client side, which means I need to configure on each of my working environment. Fortunately, the install and configuration of git-bz is very easy and I can very easily use the Bugzilla as a patch system by using git-bz.

Install

git clone git://git.fishsoup.net/git-bz
ln -s `pwd`/git-bz/git-bz ~/bin/git-bz

Configuration

I only set two default parameter for (http://janzhou.org/bugzilla/):

git config --global bz.default-tracker janzhou.org
git config --global bz-tracker.janzhou.org.path /bugzilla

Then, login from firefox, and everything is set.

Patch system

Attach Patch

To attatch the last commit to bugzilla:

git bz attach bug_id HEAD

replace bug_id with real number

To apply the patch from bugzilla:

git bz apply bug_id

replace bug_id with real number

Push

git bz push origin HEAD:master -f --fix

This command calls the git push and push the patch to the bugzilla.

For complete manual: http://git.fishsoup.net/man/git-bz.html