baseset: keep the input set around
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 20 Aug 2015 17:19:56 -0700
changeset 26060 4ee2af2194d4
parent 26059 8779ce81ea80
child 26061 be8a4e0800d8
baseset: keep the input set around Baseset needs a list to operate, but will convert that list back to a set for membership testing. It seems a bit silly to convert the set into a list to convert it back afterward.
mercurial/revset.py
--- a/mercurial/revset.py	Sun Aug 16 09:30:37 2015 +0900
+++ b/mercurial/revset.py	Thu Aug 20 17:19:56 2015 -0700
@@ -2967,6 +2967,8 @@
     """
     def __init__(self, data=()):
         if not isinstance(data, list):
+            if isinstance(data, set):
+                self._set = data
             data = list(data)
         self._list = data
         self._ascending = None