Mercurial > public > mercurial-scm > hg
diff mercurial/revset.py @ 16394:f3df7d34791e stable
revset: do not ignore input revisions in roots()
0329d3b12d8e is also partially reverted to use the 'narrow' parameter again and
make less changesets parents lookups.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sun, 08 Apr 2012 11:11:30 +0200 |
parents | f06c53ca59a9 |
children | c3fd35f88fbb |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Apr 06 15:17:50 2012 -0500 +++ b/mercurial/revset.py Sun Apr 08 11:11:30 2012 +0200 @@ -327,7 +327,7 @@ cs = set() pr = repo.changelog.parentrevs s = set(s) - for r in xrange(len(repo)): + for r in narrow: for p in pr(r): if p in s: cs.add(r) @@ -811,11 +811,11 @@ def roots(repo, subset, x): """``roots(set)`` - Changesets with no parent changeset in set. + Changesets in set with no parent changeset in set. """ - s = getset(repo, xrange(len(repo)), x) - cs = _children(repo, s, s) - return [r for r in s if r not in cs] + s = set(getset(repo, xrange(len(repo)), x)) + cs = _children(repo, subset, s) + return [r for r in subset if r in s and r not in cs] def secret(repo, subset, x): """``secret()``