py3: do not pass a float to dict_new_presized()
authorYuya Nishihara <yuya@tcha.org>
Sat, 03 Mar 2018 06:44:47 -0500
changeset 36622 0297f9c4caee
parent 36621 4015b9248da0
child 36623 a472a897c340
py3: do not pass a float to dict_new_presized() I really don't like the division operator of Python 3 since I'm not doing a math.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Sat Mar 03 06:41:52 2018 -0500
+++ b/mercurial/dirstate.py	Sat Mar 03 06:44:47 2018 -0500
@@ -1431,7 +1431,7 @@
             # This heuristic is imperfect in many ways, so in a future dirstate
             # format update it makes sense to just record the number of entries
             # on write.
-            self._map = parsers.dict_new_presized(len(st) / 71)
+            self._map = parsers.dict_new_presized(len(st) // 71)
 
         # Python's garbage collector triggers a GC each time a certain number
         # of container objects (the number being defined by