# HG changeset patch # User Joerg Sonnenberger # Date 2024-07-19 22:44:59 # Node ID 576876a518e1c342007ff8a8392094f030ab84d9 # Parent 82a94a956c545ef98eed3ff2ba5b9e224b3668f0 revlogutils: for issue6528 fix, pre-cache nullrev as metadata-free diff --git a/mercurial/revlogutils/rewrite.py b/mercurial/revlogutils/rewrite.py --- a/mercurial/revlogutils/rewrite.py +++ b/mercurial/revlogutils/rewrite.py @@ -736,7 +736,7 @@ def _from_report(ui, repo, context, from def filter_delta_issue6528(revlog, deltas_iter): """filter incomind deltas to repaire issue 6528 on the fly""" - metadata_cache = {} + metadata_cache = {nullrev: False} deltacomputer = deltas.deltacomputer(revlog) @@ -847,7 +847,7 @@ def repair_issue6528( # Set of filerevs (or hex filenodes if `to_report`) that need fixing to_fix = set() - metadata_cache = {} + metadata_cache = {nullrev: False} for filerev in fl.revs(): affected = _is_revision_affected_fast( repo, fl, filerev, metadata_cache