Mercurial > public > mercurial-scm > hg
comparison mercurial/hbisect.py @ 15137:91f93dcd72aa
revset.bisect: add new 'pruned' set 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@anciens.enib.fr>
author | "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> |
---|---|
date | Sat, 17 Sep 2011 17:30:35 +0200 |
parents | 18219c0789ae |
children | 883d28233a4d |
comparison
equal
deleted
inserted
replaced
15136:18219c0789ae | 15137:91f93dcd72aa |
---|---|
158 """ | 158 """ |
159 Return a list of revision(s) that match the given status: | 159 Return a list of revision(s) that match the given status: |
160 | 160 |
161 - ``good``, ``bad``, ``skip``: as the names imply | 161 - ``good``, ``bad``, ``skip``: as the names imply |
162 - ``range`` : all csets taking part in the bisection | 162 - ``range`` : all csets taking part in the bisection |
163 - ``pruned`` : good|bad|skip, excluding out-of-range csets | |
163 """ | 164 """ |
164 state = load_state(repo) | 165 state = load_state(repo) |
165 if status in ('good', 'bad', 'skip'): | 166 if status in ('good', 'bad', 'skip'): |
166 return [repo.changelog.rev(n) for n in state[status]] | 167 return [repo.changelog.rev(n) for n in state[status]] |
167 else: | 168 else: |
188 range = set(c for c in ba if c in gd) | 189 range = set(c for c in ba if c in gd) |
189 range |= set(c for c in ga if c in bd) | 190 range |= set(c for c in ga if c in bd) |
190 | 191 |
191 if status == 'range': | 192 if status == 'range': |
192 return [c for c in range] | 193 return [c for c in range] |
194 elif status == 'pruned': | |
195 # We do not want skipped csets that are out-of-range | |
196 return [c for c in range if c in (goods | bads | skips)] | |
193 | 197 |
194 else: | 198 else: |
195 raise error.ParseError(_('invalid bisect state')) | 199 raise error.ParseError(_('invalid bisect state')) |