Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 16395:c3fd35f88fbb stable
revset: retrieve a bit less parents in roots()
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sun, 08 Apr 2012 11:13:06 +0200 |
parents | f3df7d34791e |
children | 03e408a122c4 |
comparison
equal
deleted
inserted
replaced
16394:f3df7d34791e | 16395:c3fd35f88fbb |
---|---|
812 def roots(repo, subset, x): | 812 def roots(repo, subset, x): |
813 """``roots(set)`` | 813 """``roots(set)`` |
814 Changesets in set with no parent changeset in set. | 814 Changesets in set with no parent changeset in set. |
815 """ | 815 """ |
816 s = set(getset(repo, xrange(len(repo)), x)) | 816 s = set(getset(repo, xrange(len(repo)), x)) |
817 subset = [r for r in subset if r in s] | |
817 cs = _children(repo, subset, s) | 818 cs = _children(repo, subset, s) |
818 return [r for r in subset if r in s and r not in cs] | 819 return [r for r in subset if r not in cs] |
819 | 820 |
820 def secret(repo, subset, x): | 821 def secret(repo, subset, x): |
821 """``secret()`` | 822 """``secret()`` |
822 Changeset in secret phase.""" | 823 Changeset in secret phase.""" |
823 getargs(x, 0, 0, _("secret takes no arguments")) | 824 getargs(x, 0, 0, _("secret takes no arguments")) |