# HG changeset patch # User Benoit Boissinot # Date 2009-05-17 00:44:12 # Node ID d1ca637b0773283ae3165862ff1e30e93037e7f9 # Parent e1f4343db7402f6e17be2ccb8bcc62bcb7dfb717 revlog.missing(): use sets instead of a dict diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -624,18 +624,18 @@ class revlog(object): has.update(common) # take all ancestors from heads that aren't in has - missing = {} + missing = set() visit = [r for r in heads if r not in has] while visit: r = visit.pop(0) if r in missing: continue else: - missing[r] = None + missing.add(r) for p in self.parentrevs(r): if p not in has: visit.append(p) - missing = missing.keys() + missing = list(missing) missing.sort() return [self.node(r) for r in missing]