mercurial/revlogutils/deltas.py
changeset 42464 66c27df1be84
parent 42463 a0b26fc8fbba
child 42465 6e9ba867a946
--- 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,