--- a/mercurial/revlogutils/deltas.py Thu Apr 25 22:30:14 2019 +0200
+++ b/mercurial/revlogutils/deltas.py Thu Apr 25 22:50:33 2019 +0200
@@ -698,6 +698,12 @@
# delta lower bound is larger than accepted upper bound
continue
+ # check the relative constraint on the delta size
+ revlength = revlog.length(rev)
+ if revlength < lowestrealisticdeltalen:
+ # delta probable lower bound is larger than target base
+ continue
+
group.append(rev)
if group:
# XXX: in the sparse revlog case, group can become large,