changeset 25554:94441df6206c

revset: mark spots that use 'set' instead of 'smartset' Using smartset is better because we can do more optimisation on it. So we are marking the faulty spot for later processing.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 11 Jun 2015 15:45:02 -0700
parents fa2e91d00e4c
children 838fa1932ff8
files mercurial/revset.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Jun 11 15:43:11 2015 -0700
+++ b/mercurial/revset.py	Thu Jun 11 15:45:02 2015 -0700
@@ -1353,6 +1353,8 @@
         exclude = getset(repo, fullreposet(repo), args[1])
 
     results = set(cl.findmissingrevs(common=exclude, heads=include))
+    # XXX we should turn this into a baseset instead of a set, smartset may do
+    # some optimisations from the fact this is a baseset.
     return subset & results
 
 def origin(repo, subset, x):
@@ -1382,6 +1384,8 @@
 
     o = set([_firstsrc(r) for r in dests])
     o -= set([None])
+    # XXX we should turn this into a baseset instead of a set, smartset may do
+    # some optimisations from the fact this is a baseset.
     return subset & o
 
 def outgoing(repo, subset, x):
@@ -1424,6 +1428,8 @@
     for r in getset(repo, fullreposet(repo), x):
         ps.add(cl.parentrevs(r)[0])
     ps -= set([node.nullrev])
+    # XXX we should turn this into a baseset instead of a set, smartset may do
+    # some optimisations from the fact this is a baseset.
     return subset & ps
 
 def p2(repo, subset, x):
@@ -1445,6 +1451,8 @@
     for r in getset(repo, fullreposet(repo), x):
         ps.add(cl.parentrevs(r)[1])
     ps -= set([node.nullrev])
+    # XXX we should turn this into a baseset instead of a set, smartset may do
+    # some optimisations from the fact this is a baseset.
     return subset & ps
 
 def parents(repo, subset, x):
@@ -1507,6 +1515,8 @@
         s = set()
         for u in repo._phasecache._phasesets[1:]:
             s.update(u)
+        # XXX we should turn this into a baseset instead of a set, smartset may
+        # do some optimisations from the fact this is a baseset.
         return subset & s
     else:
         phase = repo._phasecache.phase