Show More
@@ -284,16 +284,22 b' class _BaseBranchCache:' | |||
|
284 | 284 | """ |
|
285 | 285 | starttime = util.timer() |
|
286 | 286 | cl = repo.changelog |
|
287 | # Faster than using ctx.obsolete() | |
|
288 | obsrevs = obsolete.getrevs(repo, b'obsolete') | |
|
287 | 289 | # collect new branch entries |
|
288 | 290 | newbranches = {} |
|
289 | 291 | getbranchinfo = repo.revbranchcache().branchinfo |
|
290 | 292 | max_rev = -1 |
|
291 | 293 | for r in revgen: |
|
294 | max_rev = max(max_rev, r) | |
|
295 | if r in obsrevs: | |
|
296 | # We ignore obsolete changesets as they shouldn't be | |
|
297 | # considered heads. | |
|
298 | continue | |
|
292 | 299 | branch, closesbranch = getbranchinfo(r) |
|
293 | 300 | newbranches.setdefault(branch, []).append(r) |
|
294 | 301 | if closesbranch: |
|
295 | 302 | self._closednodes.add(cl.node(r)) |
|
296 | max_rev = max(max_rev, r) | |
|
297 | 303 | if max_rev < 0: |
|
298 | 304 | msg = "running branchcache.update without revision to update" |
|
299 | 305 | raise error.ProgrammingError(msg) |
@@ -306,9 +312,6 b' class _BaseBranchCache:' | |||
|
306 | 312 | # use the faster unfiltered parent accessor. |
|
307 | 313 | parentrevs = repo.unfiltered().changelog.parentrevs |
|
308 | 314 | |
|
309 | # Faster than using ctx.obsolete() | |
|
310 | obsrevs = obsolete.getrevs(repo, b'obsolete') | |
|
311 | ||
|
312 | 315 | for branch, newheadrevs in newbranches.items(): |
|
313 | 316 | # For every branch, compute the new branchheads. |
|
314 | 317 | # A branchhead is a revision such that no descendant is on |
@@ -349,11 +352,6 b' class _BaseBranchCache:' | |||
|
349 | 352 | bheadset = {cl.rev(node) for node in bheads} |
|
350 | 353 | uncertain = set() |
|
351 | 354 | for newrev in sorted(newheadrevs): |
|
352 | if newrev in obsrevs: | |
|
353 | # We ignore obsolete changesets as they shouldn't be | |
|
354 | # considered heads. | |
|
355 | continue | |
|
356 | ||
|
357 | 355 | if not bheadset: |
|
358 | 356 | bheadset.add(newrev) |
|
359 | 357 | continue |
General Comments 0
You need to be logged in to leave comments.
Login now