Mercurial > hg
comparison mercurial/revlogutils/deltas.py @ 40654:fd1d41ccbe38
sparse-revlog: use `span` variable as intended
The variable was planned to be used in the while condition but was not used
yet.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 15 Nov 2018 14:55:11 +0100 |
parents | 9c3c697267db |
children | 2eb48aa0acce |
comparison
equal
deleted
inserted
replaced
40653:6d0fdeda43f7 | 40654:fd1d41ccbe38 |
---|---|
262 endrevidx = nbitem | 262 endrevidx = nbitem |
263 if nbitem - startrevidx <= 1: | 263 if nbitem - startrevidx <= 1: |
264 break # protect against individual chunk larger than limit | 264 break # protect against individual chunk larger than limit |
265 localenddata = revlog.end(revs[endrevidx - 1]) | 265 localenddata = revlog.end(revs[endrevidx - 1]) |
266 span = localenddata - startdata | 266 span = localenddata - startdata |
267 while (localenddata - startdata) > targetsize: | 267 while span > targetsize: |
268 if endrevidx - startrevidx <= 1: | 268 if endrevidx - startrevidx <= 1: |
269 break # protect against individual chunk larger than limit | 269 break # protect against individual chunk larger than limit |
270 endrevidx -= (endrevidx - startrevidx) // 2 | 270 endrevidx -= (endrevidx - startrevidx) // 2 |
271 localenddata = revlog.end(revs[endrevidx - 1]) | 271 localenddata = revlog.end(revs[endrevidx - 1]) |
272 span = localenddata - startdata | 272 span = localenddata - startdata |