revset: backed out changeset 54cedee86e51 stable
authorMatt Mackall <mpm@selenic.com>
Mon, 26 Nov 2012 13:44:11 -0600
branchstable
changeset 17961 b0affcb67cba
parent 17952 54cedee86e51
child 17962 4c29668ca316
revset: backed out changeset 54cedee86e51 This was causing clones of the hg repo to go from 12.4s to 14.7s.
mercurial/revset.py
--- a/mercurial/revset.py	Fri Nov 16 15:39:12 2012 -0800
+++ b/mercurial/revset.py	Mon Nov 26 13:44:11 2012 -0600
@@ -571,14 +571,6 @@
     if not args:
         return []
     s = set(_revdescendants(repo, args, followfirst)) | set(args)
-
-    if len(subset) == len(repo):
-        # the passed in revisions may not exist, -1 for example
-        for arg in args:
-            if arg not in subset:
-                s.remove(arg)
-        return list(s)
-
     return [r for r in subset if r in s]
 
 def descendants(repo, subset, x):
@@ -1336,10 +1328,7 @@
     Changesets in set with no parent changeset in set.
     """
     s = set(getset(repo, repo.changelog, x))
-    if len(subset) == len(repo):
-        subset = s
-    else:
-        subset = [r for r in subset if r in s]
+    subset = [r for r in subset if r in s]
     cs = _children(repo, subset, s)
     return [r for r in subset if r not in cs]