baseset: make `_set` a property cache
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 10 Oct 2014 12:30:56 -0700
changeset 22879 efe5062145c1
parent 22878 890e874cacb6
child 22880 5b635b44af14
baseset: make `_set` a property cache This will remove the need for `baseset.set()`.
mercurial/revset.py
--- a/mercurial/revset.py	Fri Oct 10 11:27:04 2014 -0700
+++ b/mercurial/revset.py	Fri Oct 10 12:30:56 2014 -0700
@@ -2313,10 +2313,13 @@
         if not isinstance(data, list):
             data = list(data)
         self._list = data
-        self._set = None
         self._ascending = None
 
     @util.propertycache
+    def _set(self):
+        return set(self._list)
+
+    @util.propertycache
     def _asclist(self):
         asclist = self._list[:]
         asclist.sort()