[PATCH 4 of 6] revset.bisected: add new 'pruned' range to the bisect keyword

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Sat Sep 17 15:27:32 CDT 2011


 mercurial/revset.py |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>
# Date 1316273435 -7200
# Node ID 2d9ba26fa04ad6106c94cd3996fa708989e50e70
# Parent  b38b65fb3830507e0070f5110c066ee48aaf26e9
revset.bisected: add new 'pruned' range to the bisect keyword

The 'pruned' set is made of changesets that did participate to
the bisection. They are made of
 - all good changesets
 - all bad changsets
 - all skipped changesets, provided they are in the bisection range

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -241,6 +241,7 @@
     ``skip``), or any of the meta-states:
 
     - ``range``    : all csets taking part in the bisection
+    - ``pruned``   : good|bad|skip, excluding out-of-range csets
     """
     state = getstring(x, _("bisect requires a string")).lower()
     bisectstate = hbisect.load_state(repo)
@@ -269,6 +270,10 @@
 
         if state == 'range':
             marked = [c for c in range]
+        elif state == 'pruned':
+            marked = [c for c in range if (   c in goods
+                                           or c in bads
+                                           or c in skips)]
 
         else:
             raise error.ParseError(_('invalid bisect state'))


More information about the Mercurial-devel mailing list