Commits

Patrick Mézard committed e83ced8

graphlog: use a set for inclusion test

This makes a big difference in performance in the special case where all
revisions are being graphed.

  • Participants
  • Parent commits f3d585c

Comments (0)

Files changed (1)

File mercurial/graphmod.py

     lowestrev = min(revs)
     gpcache = {}
 
+    knownrevs = set(revs)
     for rev in revs:
         ctx = repo[rev]
-        parents = sorted(set([p.rev() for p in ctx.parents() if p.rev() in revs]))
+        parents = sorted(set([p.rev() for p in ctx.parents()
+                              if p.rev() in knownrevs]))
         mpars = [p.rev() for p in ctx.parents() if
                  p.rev() != nullrev and p.rev() not in parents]