##// END OF EJS Templates
obsolete: introduce a _succs class...
Boris Feld -
r33910:84f72072 default
parent child Browse files
Show More
@@ -327,6 +327,9 b' def getobsoleted(repo, tr):'
327 327 obsoleted.add(rev)
328 328 return obsoleted
329 329
330 class _succs(list):
331 """small class to represent a successors with some metadata about it"""
332
330 333 def successorssets(repo, initialnode, closest=False, cache=None):
331 334 """Return set of all latest successors of initial nodes
332 335
@@ -445,7 +448,7 b' def successorssets(repo, initialnode, cl'
445 448 # case (2): end of walk.
446 449 if current in repo:
447 450 # We have a valid successors.
448 cache[current] = [(current,)]
451 cache[current] = [_succs((current,))]
449 452 else:
450 453 # Final obsolete version is unknown locally.
451 454 # Do not count that as a valid successors
@@ -521,13 +524,13 b' def successorssets(repo, initialnode, cl'
521 524 succssets = []
522 525 for mark in sorted(succmarkers[current]):
523 526 # successors sets contributed by this marker
524 markss = [[]]
527 markss = [_succs()]
525 528 for suc in mark[1]:
526 529 # cardinal product with previous successors
527 530 productresult = []
528 531 for prefix in markss:
529 532 for suffix in cache[suc]:
530 newss = list(prefix)
533 newss = _succs(prefix)
531 534 for part in suffix:
532 535 # do not duplicated entry in successors set
533 536 # first entry wins.
General Comments 0
You need to be logged in to leave comments. Login now