_descendants: directly use smartset
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 07 Oct 2014 01:36:53 -0700
changeset 22830 1d1da8abe130
parent 22829 36e09c25f870
child 22831 acf2ed431ce6
_descendants: directly use smartset As `addset` objects are proper smartset objects, we do not need to make any transformation of the result.
mercurial/revset.py
--- a/mercurial/revset.py	Fri Oct 03 03:29:55 2014 -0500
+++ b/mercurial/revset.py	Tue Oct 07 01:36:53 2014 -0700
@@ -668,9 +668,7 @@
     result = (filteredset(s, subset.__contains__, ascending=True) +
               filteredset(args, subset.__contains__, ascending=True))
 
-    # Wrap result in a filteredset since it's an addset, which doesn't
-    # implement all the necessary functions to be consumed by callers.
-    return filteredset(result, lambda r: True, ascending=True)
+    return result
 
 def descendants(repo, subset, x):
     """``descendants(set)``