2
0
Эх сурвалжийг харах

Report output order is now deterministic within the same container size

M. Ian Graham 19 жил өмнө
parent
commit
5b3f37c360

+ 3 - 1
direct/src/showbase/ContainerReport.py

@@ -156,6 +156,7 @@ class ContainerReport:
         count = 0
         count = 0
         stop = False
         stop = False
         for l in lengths:
         for l in lengths:
+            len2ids[l].sort()
             for id in len2ids[l]:
             for id in len2ids[l]:
                 obj = self._id2container[id]
                 obj = self._id2container[id]
                 print '%s: %s' % (l, self._id2pathStr[id])
                 print '%s: %s' % (l, self._id2pathStr[id])
@@ -168,7 +169,8 @@ class ContainerReport:
         initialTypes = (types.DictType, types.ListType, types.TupleType)
         initialTypes = (types.DictType, types.ListType, types.TupleType)
         for type in initialTypes:
         for type in initialTypes:
             self._outputType(type, **kArgs)
             self._outputType(type, **kArgs)
-        otherTypes = set(self._type2id2len.keys()).difference(set(initialTypes))
+        otherTypes = list(set(self._type2id2len.keys()).difference(set(initialTypes)))
+        otherTypes.sort()
         for type in otherTypes:
         for type in otherTypes:
             self._outputType(type, **kArgs)
             self._outputType(type, **kArgs)