[PATCH 1 of 4] hbisect: add two private revset descriptions
Yann E. MORIN
yann.morin.1998 at anciens.enib.fr
Wed Sep 21 19:10:17 CDT 2011
# 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
+ bads = 'bisect(bad)::bisect(bad)' # Pruned bad csets
+ skips = 'bisect(skip)' # Pruned skipped csets
+ pruned = '( (%s) | (%s) | (%s) )' % (goods, bads, skips)
# 'untested' is all cset that are- in 'range', but not in 'pruned'
untested = '( (%s) - (%s) )' % (range, pruned)
@@ -209,5 +209,13 @@
elif status == 'ignored':
return [c.rev() for c in repo.set(ignored)]
+ # Revset descriptions for private use
+ # Although not documented, they are nonetheless useable by
+ # the user
+ elif status == "__goods":
+ return [c.rev() for c in repo.set(goods)]
+ elif status == "__bads":
+ return [c.rev() for c in repo.set(bads)]
+
else:
raise error.ParseError(_('invalid bisect state'))
More information about the Mercurial-devel
mailing list