# HG changeset patch # User Gregory Szorc # Date 2019-01-30 21:36:51 # Node ID 7f853549823bb908be6f1bd1f223b67b8772ae7e # Parent 38a82e0333c970dca1da449d42a3ccfc02e15800 remotefilelog: cast division result to an int Otherwise mid is a float and this confuses __slice__ on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5760 diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -588,6 +588,7 @@ test-remotefilelog-bundles.t test-remotefilelog-cacheprocess.t test-remotefilelog-clone-tree.t test-remotefilelog-clone.t +test-remotefilelog-datapack.py test-remotefilelog-gcrepack.t test-remotefilelog-histpack.py test-remotefilelog-http.t diff --git a/hgext/remotefilelog/datapack.py b/hgext/remotefilelog/datapack.py --- a/hgext/remotefilelog/datapack.py +++ b/hgext/remotefilelog/datapack.py @@ -243,7 +243,7 @@ class datapack(basepack.basepack): else: while start < end - entrylen: mid = start + (end - start) / 2 - mid = mid - ((mid - params.indexstart) % entrylen) + mid = int(mid - ((mid - params.indexstart) % entrylen)) midnode = index[mid:mid + NODELENGTH] if midnode == node: entry = index[mid:mid + entrylen]