Mercurial > hg-stable
changeset 51946:e51161b12c7e
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
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 25 Sep 2024 12:42:47 +0200 |
parents | 16efed18ae4e |
children | 5d352e36ce06 |
files | mercurial/interfaces/repository.py tests/test-branches.t |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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)