##// END OF EJS Templates
sparse-revlog: align endrevidx usages in the _slicechunktosize...
Boris Feld -
r40693:2eb48aa0 default
parent child Browse files
Show More
@@ -234,7 +234,7 b' def _slicechunktosize(revlog, revs, targ'
234 return
234 return
235
235
236 startrevidx = 0
236 startrevidx = 0
237 endrevidx = 0
237 endrevidx = 1
238 iterrevs = enumerate(revs)
238 iterrevs = enumerate(revs)
239 next(iterrevs) # skip first rev.
239 next(iterrevs) # skip first rev.
240 # first step: get snapshots out of the way
240 # first step: get snapshots out of the way
@@ -242,14 +242,14 b' def _slicechunktosize(revlog, revs, targ'
242 span = revlog.end(r) - startdata
242 span = revlog.end(r) - startdata
243 snapshot = revlog.issnapshot(r)
243 snapshot = revlog.issnapshot(r)
244 if span <= targetsize and snapshot:
244 if span <= targetsize and snapshot:
245 endrevidx = idx
245 endrevidx = idx + 1
246 else:
246 else:
247 chunk = _trimchunk(revlog, revs, startrevidx, endrevidx + 1)
247 chunk = _trimchunk(revlog, revs, startrevidx, endrevidx)
248 if chunk:
248 if chunk:
249 yield chunk
249 yield chunk
250 startrevidx = idx
250 startrevidx = idx
251 startdata = revlog.start(r)
251 startdata = revlog.start(r)
252 endrevidx = idx
252 endrevidx = idx + 1
253 if not snapshot:
253 if not snapshot:
254 break
254 break
255
255
General Comments 0
You need to be logged in to leave comments. Login now