Show More
@@ -239,6 +239,10 class branchcache(dict): | |||||
239 | newbranches.setdefault(branch, []).append(r) |
|
239 | newbranches.setdefault(branch, []).append(r) | |
240 | if closesbranch: |
|
240 | if closesbranch: | |
241 | self._closednodes.add(cl.node(r)) |
|
241 | self._closednodes.add(cl.node(r)) | |
|
242 | ||||
|
243 | # fetch current topological heads to speed up filtering | |||
|
244 | topoheads = set(cl.headrevs()) | |||
|
245 | ||||
242 | # if older branchheads are reachable from new ones, they aren't |
|
246 | # if older branchheads are reachable from new ones, they aren't | |
243 | # really branchheads. Note checking parents is insufficient: |
|
247 | # really branchheads. Note checking parents is insufficient: | |
244 | # 1 (branch a) -> 2 (branch b) -> 3 (branch a) |
|
248 | # 1 (branch a) -> 2 (branch b) -> 3 (branch a) | |
@@ -255,7 +259,10 class branchcache(dict): | |||||
255 | # This prunes out two kinds of heads - heads that are superseded by |
|
259 | # This prunes out two kinds of heads - heads that are superseded by | |
256 | # a head in newheadrevs, and newheadrevs that are not heads because |
|
260 | # a head in newheadrevs, and newheadrevs that are not heads because | |
257 | # an existing head is their descendant. |
|
261 | # an existing head is their descendant. | |
258 | ancestors = set(cl.ancestors(newheadrevs, min(bheadset))) |
|
262 | uncertain = bheadset - topoheads | |
|
263 | if uncertain: | |||
|
264 | floorrev = min(uncertain) | |||
|
265 | ancestors = set(cl.ancestors(newheadrevs, floorrev)) | |||
259 | bheadset -= ancestors |
|
266 | bheadset -= ancestors | |
260 | bheadrevs = sorted(bheadset) |
|
267 | bheadrevs = sorted(bheadset) | |
261 | self[branch] = [cl.node(rev) for rev in bheadrevs] |
|
268 | self[branch] = [cl.node(rev) for rev in bheadrevs] |
General Comments 0
You need to be logged in to leave comments.
Login now