mercurial/obsolete.py
changeset 18275 9818f22785b7
parent 18271 67872e939945
child 18276 834ef7e70d0f
--- a/mercurial/obsolete.py	Mon Jan 07 15:50:25 2013 +0100
+++ b/mercurial/obsolete.py	Fri Jan 04 03:15:21 2013 +0100
@@ -660,7 +660,13 @@
 @cachefor('unstable')
 def _computeunstableset(repo):
     """the set of non obsolete revisions with obsolete parents"""
-    return set(repo.revs('(obsolete()::) - obsolete()'))
+    # revset is not efficient enough here
+    # we do (obsolete()::) - obsolete() by hand
+    obs = getrevs(repo, 'obsolete')
+    if not obs:
+        return set()
+    cl = repo.changelog
+    return set(r for r in cl.descendants(obs) if r not in obs)
 
 @cachefor('suspended')
 def _computesuspendedset(repo):