mercurial/revlogutils/deltas.py
changeset 40606 bfbfd15d65bd
parent 40605 a32ccd32982b
child 40607 54de23400b2a
--- a/mercurial/revlogutils/deltas.py	Tue Oct 16 14:46:28 2018 +0200
+++ b/mercurial/revlogutils/deltas.py	Thu Nov 08 15:29:58 2018 +0100
@@ -257,13 +257,13 @@
         return
 
     deltachainspan = segmentspan(revlog, revs)
-    chainpayload = sum(length(r) for r in revs)
 
     if deltachainspan < mingapsize:
         yield revs
         return
 
     readdata = deltachainspan
+    chainpayload = sum(length(r) for r in revs)
 
     if deltachainspan:
         density = chainpayload / float(deltachainspan)