# HG changeset patch # User Pierre-Yves David # Date 1727260967 -7200 # Node ID e51161b12c7e7f290a0b9dd6f8677a44d72ebff9 # Parent 16efed18ae4e07096582d13415d637f02226e6f2 rev-branch-cache: have debugupdatecache warm rbc too Since the "v2" format can be more performant than the "v1" format (thanks to mmap), it is useful to be able to make sure it is present diff -r 16efed18ae4e -r e51161b12c7e mercurial/interfaces/repository.py --- a/mercurial/interfaces/repository.py Wed Sep 25 12:49:32 2024 +0200 +++ b/mercurial/interfaces/repository.py Wed Sep 25 12:42:47 2024 +0200 @@ -82,6 +82,7 @@ CACHE_BRANCHMAP_SERVED, CACHE_BRANCHMAP_ALL, CACHE_BRANCHMAP_DETECT_PURE_TOPO, + CACHE_REV_BRANCH, CACHE_CHANGELOG_CACHE, CACHE_FILE_NODE_TAGS, CACHE_FULL_MANIFEST, diff -r 16efed18ae4e -r e51161b12c7e tests/test-branches.t --- a/tests/test-branches.t Wed Sep 25 12:49:32 2024 +0200 +++ b/tests/test-branches.t Wed Sep 25 12:42:47 2024 +0200 @@ -920,6 +920,18 @@ .hg/cache/rbc-revs-v1: size=160 .hg/cache/rbc-revs-v2: size=168 +So does explicit cache upgrade + $ mv .hg/cache/rbc-names-v2 .hg/cache/rbc-names-v1 + $ mv .hg/cache/rbc-revs-v2 .hg/cache/rbc-revs-v1 + $ f --size .hg/cache/rbc-* + .hg/cache/rbc-names-v1: size=110 + .hg/cache/rbc-revs-v1: size=168 + $ hg debugupdatecache + $ f --size .hg/cache/rbc-* + .hg/cache/rbc-names-v1: size=110 + .hg/cache/rbc-names-v2: size=110 + .hg/cache/rbc-revs-v1: size=168 + .hg/cache/rbc-revs-v2: size=168 With invalid v1 data, we rewrite it too (as v2)