diff --git a/hgext/remotefilelog/datapack.py b/hgext/remotefilelog/datapack.py --- a/hgext/remotefilelog/datapack.py +++ b/hgext/remotefilelog/datapack.py @@ -242,8 +242,8 @@ class datapack(basepack.basepack): entry = index[end:end + entrylen] else: while start < end - entrylen: - mid = start + (end - start) / 2 - mid = int(mid - ((mid - params.indexstart) % entrylen)) + mid = start + (end - start) // 2 + mid = mid - ((mid - params.indexstart) % entrylen) midnode = index[mid:mid + NODELENGTH] if midnode == node: entry = index[mid:mid + entrylen] diff --git a/tests/test-remotefilelog-datapack.py b/tests/test-remotefilelog-datapack.py --- a/tests/test-remotefilelog-datapack.py +++ b/tests/test-remotefilelog-datapack.py @@ -292,7 +292,7 @@ class datapacktestsbase(object): class testdatapackstore(datapack.datapackstore): # Ensures that we are not keeping everything in the cache. - DEFAULTCACHESIZE = int(numpacks / 2) + DEFAULTCACHESIZE = numpacks // 2 store = testdatapackstore(uimod.ui(), packdir)