Mercurial > hg
diff tests/test-tags.t @ 51492:2e8a88e5809f
branchcache: stop writing more branchcache file on disk than needed
Before this change, we were unconditionally writing a branchmap file for the
filter level passed to `update_disk`. This is actually counter productive if no
update were needed for this filter level. In many case, the branch cache for a
filter level is identical to its parent "subset" and it is better to simply
keep the subset update and reuse it every time instead of having to do identical
work for similar subset.
So we change the `update_disk` method to only write a file when that filter
level differ from its parent. This removes many cases where identical files were
written, requiring multiple boring update in the test suite.
The only notable changes is the change to `test-strip-branch-cache.t`, this
case was checking a scenario that no longer reproduce the bug as writing less
branchmap file result in less stalled cache on disk.
Strictly speaking, we could create a more convoluted scenario that create a
similar issue. However the next changeset would also cover that scenario so we
directly updated that test case to a "no longer buggy" state.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 10 Mar 2024 04:53:17 +0100 |
parents | 1dd01023649d |
children | 0d83955bc8ac |
line wrap: on
line diff
--- a/tests/test-tags.t Fri Mar 08 16:49:06 2024 +0100 +++ b/tests/test-tags.t Sun Mar 10 04:53:17 2024 +0100 @@ -792,11 +792,6 @@ $ ls tagsclient/.hg/cache branch2-base - branch2-immutable - branch2-served - branch2-served.hidden - branch2-visible - branch2-visible-hidden hgtagsfnodes1 rbc-names-v1 rbc-revs-v1 @@ -823,11 +818,6 @@ $ ls tagsclient/.hg/cache branch2-base - branch2-immutable - branch2-served - branch2-served.hidden - branch2-visible - branch2-visible-hidden hgtagsfnodes1 rbc-names-v1 rbc-revs-v1