Git-bz

From GnuCash
Revision as of 00:08, 7 November 2011 by Yawaramin (talk | contribs) (Quick guide to git-bz)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

git-bz (Accessing BugZilla from Git)

The original git-bz can be found at [1]. I have a version that works on Mac OS X. In both cases you’ll need to be signed in to BugZilla in either Firefox, Google Chrome, or another supported browser. See the git-bz documentation for a full list. The way git-bz authenticates with BugZilla is by reading your browser’s cookie file and then using the authentication information stored there.

Prerequisites

Git, a supported browser (see above) and a Python installation.

Download and Install

This consists of cloning one of the above Git repositories onto your working computer and symlinking the executable git-bz Python script somewhere in your $PATH. (On Windows, you might find it easier to add the git-bz directory to your personal %PATH%.)

Setup

I set up git-bz to interact with the GnuCash Documentation ‘component’ in Gnome BugZilla by default. The commands were:

 git config bz.default-tracker bugzilla.gnome.org
 git config bz.default-product GnuCash
 git config bz.default-component Documentation

You can customise to your preferred default component.

Work with Bugs

Attach a Patch to a Bug

To attach a patch to an existing bug, you have to commit the work to your local repo (but don't publish it), then (assuming the bugfix patch is the latest commit) run:

 git bz attach -e <bug-number> HEAD

git-bz will open an editor and let you type a message to send with the patch. git-bz will then overwrite the commit with a new one which includes a reference to the bug number. To attach a new version of the commit (after commit --amend, e.g.):

 git bz attach -e HEAD

git-bz remembers which bug to update.

Edit a Bug

 git bz edit <bug-number> | <commit> | <commit-range>

allows you to edit a bug or multiple bugs, one at a time, and add comments, mark as fixed, etc.

For a detailed reference see the git-bz.txt file in the git-bz repository.