# HG changeset patch
# User Paul Morelle <paul.more...@octobus.net>
# Date 1520420407 -3600
#      Wed Mar 07 12:00:07 2018 +0100
# Node ID d9a8f10cfaa662c5dc6f64e2726da7d763e7e717
# Parent  3eb11b8fe014f5698a3c857ee670a7892f06fc56
# EXP-Topic semi-snapshots
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
d9a8f10cfaa6
revlog: make variable name 'd' more explicit in _isgooddeltainfo

d -> deltainfo

diff -r 3eb11b8fe014 -r d9a8f10cfaa6 mercurial/revlog.py
--- a/mercurial/revlog.py       Thu Apr 19 07:57:06 2018 +0200
+++ b/mercurial/revlog.py       Wed Mar 07 12:00:07 2018 +0100
@@ -2086,26 +2086,27 @@
 
         return compressor.decompress(data)
 
-    def _isgooddeltainfo(self, d, textlen):
+    def _isgooddeltainfo(self, deltainfo, textlen):
         """Returns True if the given delta is good. Good means that it is 
within
         the disk span, disk size, and chain length bounds that we know to be
         performant."""
-        if d is None:
+        if deltainfo is None:
             return False
 
-        # - 'd.distance' is the distance from the base revision -- bounding it
-        #   limits the amount of I/O we need to do.
-        # - 'd.compresseddeltalen' is the sum of the total size of deltas we
-        #   need to apply -- bounding it limits the amount of CPU we consume.
+        # - 'deltainfo.distance' is the distance from the base revision --
+        #   bounding it limits the amount of I/O we need to do.
+        # - 'deltainfo.compresseddeltalen' is the sum of the total size of
+        #   deltas we need to apply -- bounding it limits the amount of CPU
+        #   we consume.
 
         defaultmax = textlen * 4
         maxdist = self._maxdeltachainspan
         if not maxdist:
-            maxdist = d.distance # ensure the conditional pass
+            maxdist = deltainfo.distance # ensure the conditional pass
         maxdist = max(maxdist, defaultmax)
-        if (d.distance > maxdist or d.deltalen > textlen or
-            d.compresseddeltalen > textlen * 2 or
-            (self._maxchainlen and d.chainlen > self._maxchainlen)):
+        if (deltainfo.distance > maxdist or deltainfo.deltalen > textlen or
+            deltainfo.compresseddeltalen > textlen * 2 or
+            (self._maxchainlen and deltainfo.chainlen > self._maxchainlen)):
             return False
 
         return True
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to