[PATCH 1 of 4] hbisect: add two private revset descriptions
mpm at selenic.com
Thu Sep 22 14:41:38 CDT 2011
On Thu, 2011-09-22 at 02:10 +0200, Yann E. MORIN wrote:
> # HG changeset patch
> # User "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
> # Date 1316639690 -7200
> # Node ID 85607e1e24e03e75410739cfee8465c3520ef0cd
> # Parent 510184e5a09eb09be23b55bc1191c6ca77af05d5
> hbisect: add two private revset descriptions
> This patch adds two new revset descriptions:
> - goods: list the range of 'pruned' and 'good' csets
> - bads: ditto for bad csets
> Those internal descriptions will be needed to pretty-print the
> bisection status of changesets.
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
> diff --git a/mercurial/hbisect.py b/mercurial/hbisect.py
> --- a/mercurial/hbisect.py
> +++ b/mercurial/hbisect.py
> @@ -184,10 +184,10 @@
> # - skipped
> # But in case of irrelevant goods/bads, we also need to
> # include them.
> - pg = 'bisect(good)::bisect(good)' # Pruned goods
> - pb = 'bisect(bad)::bisect(bad)' # Pruned bads
> - ps = 'bisect(skip)' # Pruned skipped
> - pruned = '( (%s) | (%s) | (%s) )' % (pg, pb, ps)
> + goods = 'bisect(good)::bisect(good)' # Pruned good csets
I don't understand these revsets.
If I have a graph that looks like:
\ \ / /
If my 'tested good' csets are [c k] and my 'tested bad' csets are [g],
then my 'assumed good' csets are '::(c or k)' = [a b c j k]. In other
words, everything to the left of c and k.
But it is not a given that goods come before bads! If we figure out it's
backwards, we flip the logic entirely:
(lines 59 and 62)
If our 'bad' csets are [a], then our whole picture flips and now our
known-good csets are [c d e f g h i k l m]. In other words, everything
to the right of c and k.
So it is impossible to calculate the good set without reference to the
bad set! Second, both the assumed good and assumed bad sets are
open-ended: they include everything in the graph to either the left or
right. So the revset should be something like 'x::' or '::x', not
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel