equal
deleted
inserted
replaced
6 # |
6 # |
7 # This software may be used and distributed according to the terms |
7 # This software may be used and distributed according to the terms |
8 # of the GNU General Public License, incorporated herein by reference. |
8 # of the GNU General Public License, incorporated herein by reference. |
9 |
9 |
10 from i18n import _ |
10 from i18n import _ |
11 import hg, util |
11 from node import short |
|
12 import util |
12 |
13 |
13 def bisect(changelog, state): |
14 def bisect(changelog, state): |
14 clparents = changelog.parentrevs |
15 clparents = changelog.parentrevs |
15 skip = dict.fromkeys([changelog.rev(n) for n in state['skip']]) |
16 skip = dict.fromkeys([changelog.rev(n) for n in state['skip']]) |
16 |
17 |
39 good = 1 |
40 good = 1 |
40 badrev, ancestors = buildancestors(state['good'], state['bad']) |
41 badrev, ancestors = buildancestors(state['good'], state['bad']) |
41 bad = changelog.node(badrev) |
42 bad = changelog.node(badrev) |
42 if not ancestors: # now we're confused |
43 if not ancestors: # now we're confused |
43 raise util.Abort(_("Inconsistent state, %s:%s is good and bad") |
44 raise util.Abort(_("Inconsistent state, %s:%s is good and bad") |
44 % (badrev, hg.short(bad))) |
45 % (badrev, short(bad))) |
45 |
46 |
46 # build children dict |
47 # build children dict |
47 children = {} |
48 children = {} |
48 visit = [badrev] |
49 visit = [badrev] |
49 candidates = [] |
50 candidates = [] |