Mercurial > hg
comparison mercurial/revset.py @ 20460:3a88d0d0c6b6
revset: added lazyset implementation to secret revset
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Tue, 04 Feb 2014 09:29:19 -0800 |
parents | 51890507c6b3 |
children | abd8e56a1038 |
comparison
equal
deleted
inserted
replaced
20459:51890507c6b3 | 20460:3a88d0d0c6b6 |
---|---|
1399 """``secret()`` | 1399 """``secret()`` |
1400 Changeset in secret phase.""" | 1400 Changeset in secret phase.""" |
1401 # i18n: "secret" is a keyword | 1401 # i18n: "secret" is a keyword |
1402 getargs(x, 0, 0, _("secret takes no arguments")) | 1402 getargs(x, 0, 0, _("secret takes no arguments")) |
1403 pc = repo._phasecache | 1403 pc = repo._phasecache |
1404 return baseset([r for r in subset if pc.phase(repo, r) == phases.secret]) | 1404 return lazyset(subset, lambda x: pc.phase(repo, x) == phases.secret) |
1405 | 1405 |
1406 def sort(repo, subset, x): | 1406 def sort(repo, subset, x): |
1407 """``sort(set[, [-]key...])`` | 1407 """``sort(set[, [-]key...])`` |
1408 Sort set by keys. The default sort order is ascending, specify a key | 1408 Sort set by keys. The default sort order is ascending, specify a key |
1409 as ``-key`` to sort in descending order. | 1409 as ``-key`` to sort in descending order. |