How to use "bzr bisect"?

Eli Zaretskii eliz at gnu.org
Mon Mar 1 18:11:00 GMT 2010


> From: Eric Siegerman <lists08-bzr at davor.org>
> Date: Mon, 01 Mar 2010 12:41:19 -0500
> 
> On Sat, 2010-02-27 at 21:14 +0200, Eli Zaretskii wrote:
> > Suppose I have a tree at revision REVBUG which is known to exhibit a
> > bug.  Suppose I also know that a prior revision REVNOBUG does not
> > exhibit this bug.  How do I start the bisection?
> > [...]
> > Was I supposed to say "bzr bisect no -r REVNOBUG" before "bzr bisect
> > yes"?
> 
> Yes, but not "before"; rather, "instead of":
> 	bzr bisect start
> 	bzr bisect no -r REVNOBUG
> 
> That will put you half-way between REVNOBUG and REVLATEST (which
> == REVBUG)

But if REVBUG != REVLATEST, this putting me half-way is a waste, isn't
it?  In a package such as Emacs, which has 99K revisions, and with
REVLATEST sufficiently far from REVBUG, that could produce unnecessary
conflicts and complicate the following build, for no good reason.

Is there a way of telling bisect not to bisect until both both REVBUG
and REVNOBUG are explicitly set?

> Basically, "bisect" assumes that REVBUG==REVLATEST and that
> REVNOBUG==1.

This should be added to the documentation, IMO.  The current text,
viz:

    By identifying a version which did not have the interesting change
    and a later version which did, a developer can test for the
    presence of the change at various points in the history,
    eventually ending up at the precise commit when the change was
    first introduced.

could be interpreted as saying that the search begins only after both
ends are set.

> The former assumption is, I suspect, both valid and optimal in the
> vast majority of cases.  The latter might not be optimal, but is at
> least safe.

It is safe for bisection purposes, but it can be painful for the user
in a project with a long history.  In my case, the first bisect put me
in the middle of Emacs's 25-year history, which as you can imagine
caused a lot of conflicts and complicated the build, in addition to
being simply unnecessary.  (I hesitated to use "bzr bisect move -r"
because it says "Try to move as little as possible.", which without
giving any reasons sounds scary.  How little is ``little'' enough?)

Anyway, thanks for the explanations.



More information about the bazaar mailing list