revset: retrieve a bit less parents in roots() stable
authorPatrick Mezard <patrick@mezard.eu>
Sun, 08 Apr 2012 11:13:06 +0200
branchstable
changeset 16395 c3fd35f88fbb
parent 16394 f3df7d34791e
child 16396 03e408a122c4
revset: retrieve a bit less parents in roots()
mercurial/revset.py
--- a/mercurial/revset.py	Sun Apr 08 11:11:30 2012 +0200
+++ b/mercurial/revset.py	Sun Apr 08 11:13:06 2012 +0200
@@ -814,8 +814,9 @@
     Changesets in set with no parent changeset in set.
     """
     s = set(getset(repo, xrange(len(repo)), x))
+    subset = [r for r in subset if r in s]
     cs = _children(repo, subset, s)
-    return [r for r in subset if r in s and r not in cs]
+    return [r for r in subset if r not in cs]
 
 def secret(repo, subset, x):
     """``secret()``