# HG changeset patch # User Pulkit Goyal # Date 2018-11-26 12:38:35 # Node ID e0b485a76009b94df3031febb7f9a1ddf91af5c7 # Parent 5d1550b9a533c279bb14fa2889d857123d146284 py3: fix couple of division operator to do integer divison Differential Revision: https://phab.mercurial-scm.org/D5305 diff --git a/hgext/remotefilelog/basepack.py b/hgext/remotefilelog/basepack.py --- a/hgext/remotefilelog/basepack.py +++ b/hgext/remotefilelog/basepack.py @@ -45,7 +45,7 @@ LARGEFANOUTPREFIX = 2 # 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 diff --git a/hgext/remotefilelog/historypack.py b/hgext/remotefilelog/historypack.py --- a/hgext/remotefilelog/historypack.py +++ b/hgext/remotefilelog/historypack.py @@ -252,7 +252,7 @@ class historypack(basepack.basepack): 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: