# HG changeset patch # User Pierre-Yves David # Date 2022-11-06 17:53:57 # Node ID 01ccb45b7393d9f71e0cacd8ab79dfb64682361a # Parent 5447c1507c862b8d52d8bb7ccd79b1c570392394 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. diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py +++ b/mercurial/revlogutils/deltas.py @@ -916,14 +916,14 @@ def _rawgroups(revlog, p1, p2, cachedelt # 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