##// END OF EJS Templates
hbisect: use a revset for ancestor calculation...
David Soria Parra -
r35127:ec25c827 default
parent child Browse files
Show More
@@ -37,29 +37,10 b' def bisect(repo, state):'
37 37 skip = set([changelog.rev(n) for n in state['skip']])
38 38
39 39 def buildancestors(bad, good):
40 # only the earliest bad revision matters
41 40 badrev = min([changelog.rev(n) for n in bad])
42 goodrevs = [changelog.rev(n) for n in good]
43 goodrev = min(goodrevs)
44 # build visit array
45 ancestors = [None] * (len(changelog) + 1) # an extra for [-1]
46
47 # set nodes descended from goodrevs
48 for rev in goodrevs:
41 ancestors = [None] * (len(changelog) + 1)
42 for rev in repo.revs("descendants(%ln) - ancestors(%ln)", good, good):
49 43 ancestors[rev] = []
50 for rev in changelog.revs(goodrev + 1):
51 for prev in clparents(rev):
52 if ancestors[prev] == []:
53 ancestors[rev] = []
54
55 # clear good revs from array
56 for rev in goodrevs:
57 ancestors[rev] = None
58 for rev in changelog.revs(len(changelog), goodrev):
59 if ancestors[rev] is None:
60 for prev in clparents(rev):
61 ancestors[prev] = None
62
63 44 if ancestors[badrev] is None:
64 45 return badrev, None
65 46 return badrev, ancestors
General Comments 0
You need to be logged in to leave comments. Login now