Show More
@@ -115,11 +115,21 b' def bisect(repo, state):' | |||
|
115 | 115 | poison.update(children.get(rev, [])) |
|
116 | 116 | continue |
|
117 | 117 | |
|
118 | unvisited = [] | |
|
118 | 119 | for c in children.get(rev, []): |
|
119 | 120 | if ancestors[c]: |
|
120 | 121 | ancestors[c] = list(set(ancestors[c] + a)) |
|
121 | 122 | else: |
|
123 | unvisited.append(c) | |
|
124 | ||
|
125 | # Reuse existing ancestor list for the first unvisited child to avoid | |
|
126 | # excessive copying for linear portions of history. | |
|
127 | if unvisited: | |
|
128 | first = unvisited.pop(0) | |
|
129 | for c in unvisited: | |
|
122 | 130 | ancestors[c] = a + [c] |
|
131 | a.append(first) | |
|
132 | ancestors[first] = a | |
|
123 | 133 | |
|
124 | 134 | assert best_rev is not None |
|
125 | 135 | best_node = changelog.node(best_rev) |
General Comments 0
You need to be logged in to leave comments.
Login now