# HG changeset patch # User Martin Geisler # Date 1304676560 -7200 # Node ID c33427080671119a7b91ad2fade2aff564594a4a # Parent 202ff575d49b81ed020de44cfa08cded3a92736f revlog: use real Booleans instead of 0/1 in nodesbetween diff -r 202ff575d49b -r c33427080671 mercurial/revlog.py --- a/mercurial/revlog.py Fri May 06 11:31:40 2011 +0200 +++ b/mercurial/revlog.py Fri May 06 12:09:20 2011 +0200 @@ -506,7 +506,7 @@ # Turn heads into a dictionary so we can remove 'fake' heads. # Also, later we will be using it to filter out the heads we can't # find from roots. - heads = dict.fromkeys(heads, 0) + heads = dict.fromkeys(heads, False) # Start at the top and keep marking parents until we're done. nodestotag = set(heads) # Remember where the top was so we can use it as a limit later. @@ -596,16 +596,16 @@ # We're trying to figure out which heads are reachable # from roots. # Mark this head as having been reached - heads[n] = 1 + heads[n] = True elif ancestors is None: # Otherwise, we're trying to discover the heads. # Assume this is a head because if it isn't, the next step # will eventually remove it. - heads[n] = 1 + heads[n] = True # But, obviously its parents aren't. for p in self.parents(n): heads.pop(p, None) - heads = [n for n in heads.iterkeys() if heads[n] != 0] + heads = [n for n, flag in heads.iteritems() if flag] roots = list(roots) assert orderedout assert roots