Mercurial > hg-stable
comparison mercurial/revset.py @ 22750:66e2b648deef
_descendant: use filteredset instead of orderedlazyset
The orderedlazyset class is going away. Filteredset gives the same service.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 02 Oct 2014 19:43:42 -0500 |
parents | 672f15ee2a1d |
children | e76aec3eddc4 |
comparison
equal
deleted
inserted
replaced
22749:672f15ee2a1d | 22750:66e2b648deef |
---|---|
663 s = _revdescendants(repo, args, followfirst) | 663 s = _revdescendants(repo, args, followfirst) |
664 | 664 |
665 # Both sets need to be ascending in order to lazily return the union | 665 # Both sets need to be ascending in order to lazily return the union |
666 # in the correct order. | 666 # in the correct order. |
667 args.ascending() | 667 args.ascending() |
668 result = (orderedlazyset(s, subset.__contains__, ascending=True) + | 668 result = (filteredset(s, subset.__contains__, ascending=True) + |
669 orderedlazyset(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 # Wrap result in a filteredset since it's an _addset, which doesn't |
672 # implement all the necessary functions to be consumed by callers. | 672 # implement all the necessary functions to be consumed by callers. |
673 return orderedlazyset(result, lambda r: True, ascending=True) | 673 return filteredset(result, lambda r: True, ascending=True) |
674 | 674 |
675 def descendants(repo, subset, x): | 675 def descendants(repo, subset, x): |
676 """``descendants(set)`` | 676 """``descendants(set)`` |
677 Changesets which are descendants of changesets in set. | 677 Changesets which are descendants of changesets in set. |
678 """ | 678 """ |