Patchwork D5305: py3: fix couple of division operator to do integer divison

login
register
mail settings
Submitter phabricator
Date Nov. 26, 2018, 11:06 p.m.
Message ID <09fc09675808683488176fdec29ba8d0@localhost.localdomain>
Download mbox | patch
Permalink /patch/36805/
State Not Applicable
Headers show

Comments

phabricator - Nov. 26, 2018, 11:06 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe0b485a76009: py3: fix couple of division operator to do integer divison (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5305?vs=12599&id=12604

REVISION DETAIL
  https://phab.mercurial-scm.org/D5305

AFFECTED FILES
  hgext/remotefilelog/basepack.py
  hgext/remotefilelog/historypack.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

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 @@ 
             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:
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 @@ 
 # 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