changeset 40735:e0b485a76009

py3: fix couple of division operator to do integer divison Differential Revision: https://phab.mercurial-scm.org/D5305
author Pulkit Goyal <pulkit@yandex-team.ru>
date Mon, 26 Nov 2018 15:38:35 +0300
parents 5d1550b9a533
children 0728d87a8631
files hgext/remotefilelog/basepack.py hgext/remotefilelog/historypack.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/remotefilelog/basepack.py	Mon Nov 26 15:37:48 2018 +0300
+++ b/hgext/remotefilelog/basepack.py	Mon Nov 26 15:38:35 2018 +0300
@@ -45,7 +45,7 @@
 # bisect) with (8 step fanout scan + 1 step bisect)
 # 5 step bisect = log(2^16 / 8 / 255)  # fanout
 # 10 step fanout scan = 2^16 / (2^16 / 8)  # fanout space divided by entries
-SMALLFANOUTCUTOFF = 2**16 / 8
+SMALLFANOUTCUTOFF = 2**16 // 8
 
 # The amount of time to wait between checking for new packs. This prevents an
 # exception when data is moved to a new pack after the process has already
--- a/hgext/remotefilelog/historypack.py	Mon Nov 26 15:37:48 2018 +0300
+++ b/hgext/remotefilelog/historypack.py	Mon Nov 26 15:38:35 2018 +0300
@@ -252,7 +252,7 @@
             return self._index[end:end + entrylen]
         else:
             while start < end - entrylen:
-                mid = start + (end - start) / 2
+                mid = start + (end - start) // 2
                 mid = mid - ((mid - origstart) % entrylen)
                 midnode = self._index[mid:mid + NODELENGTH]
                 if midnode == node: