Mercurial > hg
comparison mercurial/revset.py @ 22830:1d1da8abe130
_descendants: directly use smartset
As `addset` objects are proper smartset objects, we do not need to make any
transformation of the result.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 07 Oct 2014 01:36:53 -0700 |
parents | 36e09c25f870 |
children | acf2ed431ce6 |
comparison
equal
deleted
inserted
replaced
22829:36e09c25f870 | 22830:1d1da8abe130 |
---|---|
666 # in the correct order. | 666 # in the correct order. |
667 args.ascending() | 667 args.ascending() |
668 result = (filteredset(s, subset.__contains__, ascending=True) + | 668 result = (filteredset(s, subset.__contains__, ascending=True) + |
669 filteredset(args, subset.__contains__, ascending=True)) | 669 filteredset(args, subset.__contains__, ascending=True)) |
670 | 670 |
671 # Wrap result in a filteredset since it's an addset, which doesn't | 671 return result |
672 # implement all the necessary functions to be consumed by callers. | |
673 return filteredset(result, lambda r: True, ascending=True) | |
674 | 672 |
675 def descendants(repo, subset, x): | 673 def descendants(repo, subset, x): |
676 """``descendants(set)`` | 674 """``descendants(set)`` |
677 Changesets which are descendants of changesets in set. | 675 Changesets which are descendants of changesets in set. |
678 """ | 676 """ |