comparison mercurial/revset.py @ 20451:ac7cebf45eb4

revset: added lazyset implementation to draft revset
author Lucas Moscovicz <lmoscovicz@fb.com>
date Mon, 03 Feb 2014 16:15:25 -0800
parents 4f1aed2c7a7e
children a685d9870eb5
comparison
equal deleted inserted replaced
20450:4f1aed2c7a7e 20451:ac7cebf45eb4
672 """``draft()`` 672 """``draft()``
673 Changeset in draft phase.""" 673 Changeset in draft phase."""
674 # i18n: "draft" is a keyword 674 # i18n: "draft" is a keyword
675 getargs(x, 0, 0, _("draft takes no arguments")) 675 getargs(x, 0, 0, _("draft takes no arguments"))
676 pc = repo._phasecache 676 pc = repo._phasecache
677 return baseset([r for r in subset if pc.phase(repo, r) == phases.draft]) 677 return lazyset(subset, lambda r: pc.phase(repo, r) == phases.draft)
678 678
679 def extinct(repo, subset, x): 679 def extinct(repo, subset, x):
680 """``extinct()`` 680 """``extinct()``
681 Obsolete changesets with obsolete descendants only. 681 Obsolete changesets with obsolete descendants only.
682 """ 682 """