Show More
@@ -12,4 +12,5 b' max(tip:0)' | |||||
12 | min(0:tip) |
|
12 | min(0:tip) | |
13 | 0:: |
|
13 | 0:: | |
14 | min(0::) |
|
14 | min(0::) | |
|
15 | roots((tip~100::) - (tip~100::tip)) | |||
15 | ::p1(p1(tip)):: |
|
16 | ::p1(p1(tip)):: |
@@ -661,8 +661,18 b' def _descendants(repo, subset, x, follow' | |||||
661 | if not args: |
|
661 | if not args: | |
662 | return baseset([]) |
|
662 | return baseset([]) | |
663 | s = _revdescendants(repo, args, followfirst) |
|
663 | s = _revdescendants(repo, args, followfirst) | |
664 | a = set(args) |
|
664 | ||
665 | return subset.filter(lambda r: r in s or r in a) |
|
665 | # Both sets need to be ascending in order to lazily return the union | |
|
666 | # in the correct order. | |||
|
667 | args.ascending() | |||
|
668 | ||||
|
669 | subsetset = subset.set() | |||
|
670 | result = (orderedlazyset(s, subsetset.__contains__, ascending=True) + | |||
|
671 | orderedlazyset(args, subsetset.__contains__, ascending=True)) | |||
|
672 | ||||
|
673 | # Wrap result in a lazyset since it's an _addset, which doesn't implement | |||
|
674 | # all the necessary functions to be consumed by callers. | |||
|
675 | return orderedlazyset(result, lambda r: True, ascending=True) | |||
666 |
|
676 | |||
667 | def descendants(repo, subset, x): |
|
677 | def descendants(repo, subset, x): | |
668 | """``descendants(set)`` |
|
678 | """``descendants(set)`` |
@@ -474,16 +474,6 b' min: empty on unordered set' | |||||
474 | 2 |
|
474 | 2 | |
475 | 1 |
|
475 | 1 | |
476 | 0 |
|
476 | 0 | |
477 | $ log '1:: and reverse(all())' |
|
|||
478 | 9 |
|
|||
479 | 8 |
|
|||
480 | 7 |
|
|||
481 | 6 |
|
|||
482 | 5 |
|
|||
483 | 4 |
|
|||
484 | 3 |
|
|||
485 | 2 |
|
|||
486 | 1 |
|
|||
487 | $ log 'rev(5)' |
|
477 | $ log 'rev(5)' | |
488 | 5 |
|
478 | 5 | |
489 | $ log 'sort(limit(reverse(all()), 3))' |
|
479 | $ log 'sort(limit(reverse(all()), 3))' |
General Comments 0
You need to be logged in to leave comments.
Login now