[RFC] distributed bug tracking system

Michal Kvasnica kvasnica at control.ee.ethz.ch
Mon May 8 06:17:20 CDT 2006


Hello,

following the Summer of Code 2006 proposal, I took a brief look at the
"Bugs Everywhere" package available at

  http://www.panoramicfeedback.com/opensource/

To put it short, I managed to hack a Mercurial extension which allows
one to create and manage bugs inside of hg. All operations are described
by text files and versioned using Mercurial.

If you want to give it a try, download the extension from

  http://control.ee.ethz.ch/~kvasnica/be/beext.py

and install it as usual. Then you can use following commands:

$ hg binit
Directory initialized.

$ hg bnew "first bug"
Created bug with ID 1ad0e1

$ hg blist
Unassigned bugs
===============
1ad0e1: first bug

$ hg bcomment -m "first comment" 1a
$ hg bshow 1a
  ID:           1ad0e1
  Severity:     minor
  Assigned to:  None
  Target:       None
  Creator:      michal

first bug

Created: Mon, 08 May 2006 12:42 (Mon, 08 May 2006 10:42:55 +0000)
--------- Comment ---------
Name: 1ad0e1:1
From: michal
Date: Mon, 08 May 2006 10:44:01 +0000

first comment

$ hg bcomment 1a
will open the editor set in the "[ui]" section of your .hgrc

$ hg btarget 1a
No target assigned.

$ hg btarget 1a "release 1"
$ hg bnew bug2
Created bug with ID d43a80
$ hg btarget d4 "release 2"
$ hg blist
Unassigned bugs
===============
d43a80: bug2

1ad0e1: first bug

$ hg bset target "release 2"
$ hg blist -t
Unassigned bugs for target release 2
====================================
d43a80: bug2

$ hg bclose d4
$ hg log | head
changeset:   9:ae69723582ab
tag:         tip
user:        michal
date:        Mon May 08 12:47:56 2006 +0200
summary:     [bug d43a80] closed

changeset:   8:2620d3a6e876
user:        michal
date:        Mon May 08 12:46:59 2006 +0200
summary:     [bug d43a80] target: release 2

$ hg bassign 1a && hg bshow 1a
  ID:           1ad0e1
  Severity:     minor
  Assigned to:  michal
  Target:       release 1
  Creator:      michal

$ hg bassign 1a "somebody else" && hg bshow 1a
  ID:           1ad0e1
  Severity:     minor
  Assigned to:  somebody else
  Target:       release 1
  Creator:      michal


"hg help" will list some more available commands, all prefixed by a "b"
letter. Output formating still needs some work to be done, I haven't
deviated much from the original version.

Some random thoughts:

The extension contains all the necessary code ripped from the Bugs
Everywhere (BE) package, therefore it doesn't require BE to be
installed. However for a better maintenance it would probably make more
sense to have an extension which just calls BE's commands directly.

If anybody is interested, I can provide the necessary patches on top of
BE which allow it to use Mercurial as one of the back-ends. However I
would also propose the BE people to make some changes to the workflow of
their package (for instance better commit messages, which I have already
changed in my extension). I can elaborate on this if anybody is interested.

There is one problem with the original design of BE -- it uses random
UUIDs generated by the command "uuidgen". This, on my Windows
installation, is available as part of MSVC, but I don't have any such
utility available on my Linux/Solaris boxes. Therefore I have replaced
UUIDs with SHA1 hashes of "time.time()" to get some randomization.

The stand-alone BE package also provides a web interface based on the
TurboGears framework, but I haven't tried that feature yet. Anyhow, that
relies on the original BE package to be available.

Please note that my Python skills are very close to _zero_. Therefore
the code is very ugly and can make your eyes roll when you start to look
at it :) I would only welcome if some person with Python skills bigger
than mine could take over this work.

Michal


More information about the Mercurial mailing list