Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hbisect.py @ 16647:14913fcb30c6
bisect: track the current changeset (issue3382)
Introduce a new revset feature, bisect(current), that identifies
the changeset currently being bisected.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Tue, 08 May 2012 15:29:09 -0700 |
parents | 1f677c7e494d |
children | 107a3270a24a |
line wrap: on
line diff
--- a/mercurial/hbisect.py Fri May 04 15:56:45 2012 -0400 +++ b/mercurial/hbisect.py Tue May 08 15:29:09 2012 -0700 @@ -132,7 +132,7 @@ def load_state(repo): - state = {'good': [], 'bad': [], 'skip': []} + state = {'current': [], 'good': [], 'bad': [], 'skip': []} if os.path.exists(repo.join("bisect.state")): for l in repo.opener("bisect.state"): kind, node = l[:-1].split() @@ -164,10 +164,11 @@ - ``pruned`` : csets that are goods, bads or skipped - ``untested`` : csets whose fate is yet unknown - ``ignored`` : csets ignored due to DAG topology + - ``current`` : the cset currently being bisected """ state = load_state(repo) - if status in ('good', 'bad', 'skip'): - return [repo.changelog.rev(n) for n in state[status]] + if status in ('good', 'bad', 'skip', 'current'): + return map(repo.changelog.rev, state[status]) else: # In the floowing sets, we do *not* call 'bisect()' with more # than one level of recusrsion, because that can be very, very @@ -233,7 +234,7 @@ if rev in get(repo, 'skip'): # i18n: bisect changeset status return _('skipped') - if rev in get(repo, 'untested'): + if rev in get(repo, 'untested') or rev in get(repo, 'current'): # i18n: bisect changeset status return _('untested') if rev in get(repo, 'ignored'):