delta-find: rename a variable for clarity
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 06 Nov 2022 12:53:57 -0500
changeset 49615 01ccb45b7393
parent 49614 5447c1507c86
child 49616 4956942c0416
delta-find: rename a variable for clarity the index in the delta-chain is also the snapshot depth. So we rename the variable for clarity.
mercurial/revlogutils/deltas.py
--- a/mercurial/revlogutils/deltas.py	Sun Nov 06 12:53:03 2022 -0500
+++ b/mercurial/revlogutils/deltas.py	Sun Nov 06 12:53:57 2022 -0500
@@ -916,14 +916,14 @@
             # chain.
             max_depth = max(parents_snaps.keys())
             chain = deltachain(other)
-            for idx, s in enumerate(chain):
+            for depth, s in enumerate(chain):
                 if s < snapfloor:
                     continue
-                if max_depth < idx:
+                if max_depth < depth:
                     break
                 if not revlog.issnapshot(s):
                     break
-                parents_snaps[idx].add(s)
+                parents_snaps[depth].add(s)
         # Test them as possible intermediate snapshot base
         # We test them from highest to lowest level. High level one are more
         # likely to result in small delta