revlogutils: for
issue6528 fix, pre-cache nullrev as metadata-free
--- a/mercurial/revlogutils/rewrite.py Sat Jul 20 00:59:50 2024 +0200
+++ b/mercurial/revlogutils/rewrite.py Sat Jul 20 00:44:59 2024 +0200
@@ -736,7 +736,7 @@
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 @@
# 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