changeset 49614:01ccb45b7393

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 06 Nov 2022 12:53:57 -0500
parents 5447c1507c86
children 4956942c0416
files mercurial/revlogutils/deltas.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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