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