mercurial/smartset.py
changeset 31142 90fb0193f187
parent 31083 c962bb6af909
child 31455 9a94239e4f12
--- a/mercurial/smartset.py	Tue Feb 28 20:23:10 2017 +0100
+++ b/mercurial/smartset.py	Sat Feb 18 17:37:52 2017 +0900
@@ -219,16 +219,14 @@
         """
         self._ascending = None
         self._istopo = istopo
-        if not isinstance(data, list):
-            if isinstance(data, set):
-                self._set = data
-                # set has no order we pick one for stability purpose
-                self._ascending = True
-                # converting set to list has a cost, do it lazily
-                data = None
-            else:
+        if isinstance(data, set):
+            # converting set to list has a cost, do it lazily
+            self._set = data
+            # set has no order we pick one for stability purpose
+            self._ascending = True
+        else:
+            if not isinstance(data, list):
                 data = list(data)
-        if data is not None:
             self._list = data
         self._datarepr = datarepr