--- a/mercurial/revlogutils/deltas.py Thu Nov 15 14:55:11 2018 +0100
+++ b/mercurial/revlogutils/deltas.py Thu Nov 15 14:57:26 2018 +0100
@@ -234,7 +234,7 @@
return
startrevidx = 0
- endrevidx = 0
+ endrevidx = 1
iterrevs = enumerate(revs)
next(iterrevs) # skip first rev.
# first step: get snapshots out of the way
@@ -242,14 +242,14 @@
span = revlog.end(r) - startdata
snapshot = revlog.issnapshot(r)
if span <= targetsize and snapshot:
- endrevidx = idx
+ endrevidx = idx + 1
else:
- chunk = _trimchunk(revlog, revs, startrevidx, endrevidx + 1)
+ chunk = _trimchunk(revlog, revs, startrevidx, endrevidx)
if chunk:
yield chunk
startrevidx = idx
startdata = revlog.start(r)
- endrevidx = idx
+ endrevidx = idx + 1
if not snapshot:
break