changeset 15903:0329d3b12d8e

revset: roots needs to be computed on full set
author Matt Mackall <mpm@selenic.com>
date Tue, 17 Jan 2012 17:48:59 -0600
parents 4252d9f08d7e
children 7d28d6a67dd3
files mercurial/revset.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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]