Show More
@@ -45,7 +45,7 b' LARGEFANOUTPREFIX = 2' | |||||
45 | # bisect) with (8 step fanout scan + 1 step bisect) |
|
45 | # bisect) with (8 step fanout scan + 1 step bisect) | |
46 | # 5 step bisect = log(2^16 / 8 / 255) # fanout |
|
46 | # 5 step bisect = log(2^16 / 8 / 255) # fanout | |
47 | # 10 step fanout scan = 2^16 / (2^16 / 8) # fanout space divided by entries |
|
47 | # 10 step fanout scan = 2^16 / (2^16 / 8) # fanout space divided by entries | |
48 | SMALLFANOUTCUTOFF = 2**16 / 8 |
|
48 | SMALLFANOUTCUTOFF = 2**16 // 8 | |
49 |
|
49 | |||
50 | # The amount of time to wait between checking for new packs. This prevents an |
|
50 | # The amount of time to wait between checking for new packs. This prevents an | |
51 | # exception when data is moved to a new pack after the process has already |
|
51 | # exception when data is moved to a new pack after the process has already |
@@ -252,7 +252,7 b' class historypack(basepack.basepack):' | |||||
252 | return self._index[end:end + entrylen] |
|
252 | return self._index[end:end + entrylen] | |
253 | else: |
|
253 | else: | |
254 | while start < end - entrylen: |
|
254 | while start < end - entrylen: | |
255 | mid = start + (end - start) / 2 |
|
255 | mid = start + (end - start) // 2 | |
256 | mid = mid - ((mid - origstart) % entrylen) |
|
256 | mid = mid - ((mid - origstart) % entrylen) | |
257 | midnode = self._index[mid:mid + NODELENGTH] |
|
257 | midnode = self._index[mid:mid + NODELENGTH] | |
258 | if midnode == node: |
|
258 | if midnode == node: |
General Comments 0
You need to be logged in to leave comments.
Login now