BE branch WTK
In order to get a feel for a good public (i.e. html and email only) interface to a Bugs Everywhere bugtracker, I'm posting my branch (http://www.physics.drexel.edu/~wking/code/bzr/be).
Read-only access to my main repository generated with Gianluca's be html. Nightly cron job on my development box to build the html and rsync it into place on the webserver.
Read/write access via my email interface to a public branch of my repository. I periodically delete any commits I don't like from the public branch and then merge them into my main devel branch. After that, I bzr merge --overwrite my devel branch to replace the public email branch.
Email interface syntax
Send email to wking at tremily dot us. There are three types of email, distinguished by tags in their subject line:
type | subject line |
creating bugs | [be-bug:submit] new bug summary |
commenting on bugs | [be-bug:<bug-id>] commit summary |
control | [be-bug] commit summary |
Creating bugs
This interface creates a bug whose summary is given by the email's post-tag subject. The body of the email must begin with a pseudo-header containing at least the Version field. Anything after the pseudo-header and before a line starting with -- is, if present, attached as the bug's first comment.
From jdoe@example.com Fri Apr 18 12:00:00 2008 From: John Doe <jdoe@example.com> Date: Fri, 18 Apr 2008 12:00:00 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [be-bug:submit] Need tests for the email interface. Version: (output of ‘be --version’) Severity: minor Someone should write up a series of test emails to send into be-handle mail so we can test changes quickly without having to use procmail. -- Goofy tagline not included.
Available pseudo-headers are Version, Reporter, Assign, Depend, Severity, Status, Tag, and Target.
Commenting on bugs
This interface appends a comment to the bug specified in the subject tag. The the first non-multipart body is attached with the appropriate content-type. In the case of text/plain contents, anything following a line starting with -- is stripped.
From jdoe@example.com Fri Apr 18 12:00:00 2008 From: John Doe <jdoe@example.com> Date: Fri, 18 Apr 2008 12:00:00 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [be-bug:XYZ] Isolated problem in baz() Finally tracked it down to the bar() call. Some sort of string<->unicode conversion problem. Solution ideas? -- Goofy tagline not included.
Controlling bugs
This interface consists of a list of allowed be commands, with one command per line. Blank lines and lines beginning with # are ignored, as well anything following a line starting with --. All the listed commands are executed in order and their output returned. The commands are split into arguments with the POSIX-compliant shlex.split().
From jdoe@example.com Fri Apr 18 12:00:00 2008 From: John Doe <jdoe@example.com> Date: Fri, 18 Apr 2008 12:00:00 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [be-bug] I'll handle XYZ by release 1.2.3 assign XYZ "John Doe <jdoe@example.com>" status XYZ assigned severity XYZ critical target XYZ 1.2.3 -- Goofy tagline ignored.
Other interesting things
BE dependency graph generated with depgraph. This graph does not show any of the becommands or their dependencies (e.g. libbe.diff), but they are straightforward enough and the graph already crowded enough that I left them out.