bisect plugin

Jeff Licquia jeff at licquia.org
Thu Sep 7 05:31:03 BST 2006


This is my first run at a bisect plugin for bzr.  It's available at:

http://bzr.licquia.org/bzr-bisect

It's also my first bzr plugin.  Please try not to laugh too loudly when
reading the code. :-)

The plugin has been tested against the 0.8, 0.9, and 0.10 branches of
bzr.  I haven't created a wiki account yet, so it's not in the plugin
registry; feel free to add it.  The license is the GNU GPL, though I
don't have copyright info added yet.

Usage is mostly like "git bisect".  I had an odd situation with git a
while back, where I had to look for a bug by finding exactly where
upstream had accidentally fixed the bug, and inverting the meanings of
"good" and "bad" in my head was error-prone and a little weird.  So, the
respective commands for my plugin are "no" and "yes", which are intended
to answer the question "does the current revision have what I'm looking
for?"

I've also implemented a "bzr bisect move" command, which allows you to
manually move through the history if you don't like where the bisect
algorithm puts you.

Drawbacks, problems, and oddities:

 - There are probably lots of corner cases not tested for.

 - Moving through the history is done with revert.  The plugin keeps
track of the current revision itself, which is why the "move" command
exists.  There's probably a better way, but I don't know what it is.  In
particular, committing in the middle of a bisect is probably very bad
unless you really want to revert gajillions of past changes.

 - Only the "top level" of revisions--those with a revno--can be
bisected; revisions merged from other trees are skipped.  At some point,
I'd like to implement breadth-first traversal.

Suggestions and bundles welcome.  I read the list.





More information about the bazaar mailing list