Mercurial > public > mercurial-scm > hg
comparison mercurial/hbisect.py @ 6217:fe8dbbe9520d
Avoid importing mercurial.node/mercurial.repo stuff from mercurial.hg
author | Joel Rosdahl <joel@rosdahl.net> |
---|---|
date | Thu, 06 Mar 2008 22:51:16 +0100 |
parents | 51776e50bc8c |
children | 683428d1e639 8f256bf98219 |
comparison
equal
deleted
inserted
replaced
6216:a88259018f79 | 6217:fe8dbbe9520d |
---|---|
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 = [] |