##// END OF EJS Templates
revlog: use real Booleans instead of 0/1 in nodesbetween
Martin Geisler -
r14219:c3342708 default
parent child Browse files
Show More
@@ -506,7 +506,7 b' class revlog(object):'
506 506 # Turn heads into a dictionary so we can remove 'fake' heads.
507 507 # Also, later we will be using it to filter out the heads we can't
508 508 # find from roots.
509 heads = dict.fromkeys(heads, 0)
509 heads = dict.fromkeys(heads, False)
510 510 # Start at the top and keep marking parents until we're done.
511 511 nodestotag = set(heads)
512 512 # Remember where the top was so we can use it as a limit later.
@@ -596,16 +596,16 b' class revlog(object):'
596 596 # We're trying to figure out which heads are reachable
597 597 # from roots.
598 598 # Mark this head as having been reached
599 heads[n] = 1
599 heads[n] = True
600 600 elif ancestors is None:
601 601 # Otherwise, we're trying to discover the heads.
602 602 # Assume this is a head because if it isn't, the next step
603 603 # will eventually remove it.
604 heads[n] = 1
604 heads[n] = True
605 605 # But, obviously its parents aren't.
606 606 for p in self.parents(n):
607 607 heads.pop(p, None)
608 heads = [n for n in heads.iterkeys() if heads[n] != 0]
608 heads = [n for n, flag in heads.iteritems() if flag]
609 609 roots = list(roots)
610 610 assert orderedout
611 611 assert roots
General Comments 0
You need to be logged in to leave comments. Login now