Fossil Forum

fossil bisect option linear on
Login

fossil bisect option linear on

(1) By MBL (RoboManni) on 2022-06-22 07:22:54 [source]

I just saw that with checking 42f61b67 from 2022-06-05 we will get with next release this beautiful option:

Add the "fossil bisect option linear on" command that allows the "fossil bisect run" command to invoke a test script on every check-in along a path between two boundary check-ins. The "linear" option resets automatically opon "fossil bisect reset"

Question:

As this new option got to trunk only after the last recent snapshot binary, can we get an update for testing already before release of version 2.19 ?

I would love to try with the fossil bisect run [OPTIONS] COMMAND to see if I can achieve what I was already looking for to do already now for long time.

 fossil bisect reset

      Reinitialize a bisect session.  This cancels prior bisect history
      and allows a bisect session to start over from the beginning.

 fossil bisect run [OPTIONS] COMMAND

      Invoke COMMAND repeatedly to run the bisect.  The exit code for
      COMMAND should be 0 for "good", 125 for "skip", and any other value
      for "bad".  Options:

         -i|--interactive    Prompt the user for the good/bad/skip decision
                             after each step, rather than using the exit
                             code from COMMAND

The help text of run for the new option may have to be updated as well by the addition that in linear mode the first bad response will stop the whole continuation - in opposite to the bisection method where the upper or lower section would be selected only where to continue next.

How to select the stepping direction from good to bad or from bad to good ? Is there an option for this to select?

(2) By Stephan Beal (stephan) on 2022-06-23 13:29:17 in reply to 1 [link] [source]

The help text of run for the new option may have to be updated as well by the addition that in linear mode the first bad response will stop the whole continuation ...

Is that not implicit in this snippet:

      Invoke COMMAND repeatedly to run the bisect.  The exit code for
      COMMAND should be 0 for "good", 125 for "skip", and any other value
      for "bad".  Options:

Presumably someone who uses bisect understands the semantics of "good" and "bad" in that context, or is that too native/optimistic of me? The latter is definitely a possibility, but when looking at the help text to implement your suggestion i'm not finding a formulation which is as succinct and accurate as what it already says.

(3) By MBL (RoboManni) on 2022-06-23 17:28:24 in reply to 2 [link] [source]

how about:

LINEAR automatic traversal stops with the first appearance of "bad".

Regarding the stepping direction I am thinking about the choice from old to new along a timeline of a branch or from new to old. In one case I am interested to find the first appearance of something and in other case the last appearance of something specific. Between the first and the last appearances there might be more than one check-in; I would like to be able to find that timeframe range of check-in's that show the appearance.

I hope to be understood - english is not my mother tongue.

(4) By Stephan Beal (stephan) on 2022-06-23 21:14:42 in reply to 3 [link] [source]

LINEAR

Rather than add that to the 'help' text, since there's not really a good place for it ("linear" is not mentioned anywhere in that text), it's been added to the "options" list:

$ f bisect options
  auto-next        on      Automatically run "bisect next" after each "bisect good", "bisect bad", or "bisect skip"
  direct-only      on      Follow only primary parent-child links, not merges 
  display          chart   Command to run after "next". "chart", "log", "status", or "none"
  linear           off     Do a linear scan rather than a true bisect, stopping at the first "bad" result

That will be checked in soon and more documentation of the linear feature is pending before the release.

Regarding the stepping direction ...

i'm not 100% certain, but it looks like it will step in the direction from the current version to "bad", whichever direction that is.

(5) By MBL (RoboManni) on 2022-06-24 09:07:13 in reply to 4 [link] [source]

linear off Do a linear scan rather than a true bisect, stopping at the first "bad" result

Yes, I agree, that this is enough hint at the right place.