revset: roots needs to be computed on full set
authorMatt Mackall <mpm@selenic.com>
Tue, 17 Jan 2012 17:48:59 -0600
changeset 15903 0329d3b12d8e
parent 15902 4252d9f08d7e
child 15904 7d28d6a67dd3
revset: roots needs to be computed on full set
mercurial/revset.py
--- a/mercurial/revset.py	Wed Jan 18 16:46:15 2012 +0100
+++ b/mercurial/revset.py	Tue Jan 17 17:48:59 2012 -0600
@@ -325,7 +325,7 @@
     cs = set()
     pr = repo.changelog.parentrevs
     s = set(s)
-    for r in narrow:
+    for r in xrange(len(repo)):
         for p in pr(r):
             if p in s:
                 cs.add(r)
@@ -776,7 +776,7 @@
     """``roots(set)``
     Changesets with no parent changeset in set.
     """
-    s = getset(repo, subset, x)
+    s = getset(repo, xrange(len(repo)), x)
     cs = _children(repo, s, s)
     return [r for r in s if r not in cs]