Mercurial > hg-stable
comparison tests/test-treemanifest.t @ 51553: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 | dcaa2df1f688 |
children |
comparison
equal
deleted
inserted
replaced
51552:dd5b5f99940d | 51553:2e8a88e5809f |
---|---|
759 | 759 |
760 Stream clone with basicstore | 760 Stream clone with basicstore |
761 $ hg clone --config experimental.changegroup3=True --stream -U \ | 761 $ hg clone --config experimental.changegroup3=True --stream -U \ |
762 > http://localhost:$HGPORT1 stream-clone-basicstore | 762 > http://localhost:$HGPORT1 stream-clone-basicstore |
763 streaming all changes | 763 streaming all changes |
764 29 files to transfer, * of data (glob) (no-rust !) | 764 24 files to transfer, * of data (glob) (no-rust !) |
765 31 files to transfer, * of data (glob) (rust !) | 765 26 files to transfer, * of data (glob) (rust !) |
766 transferred * in * seconds (*) (glob) | 766 transferred * in * seconds (*) (glob) |
767 $ hg -R stream-clone-basicstore verify -q | 767 $ hg -R stream-clone-basicstore verify -q |
768 $ cat port-1-errors.log | 768 $ cat port-1-errors.log |
769 | 769 |
770 Stream clone with encodedstore | 770 Stream clone with encodedstore |
771 $ hg clone --config experimental.changegroup3=True --stream -U \ | 771 $ hg clone --config experimental.changegroup3=True --stream -U \ |
772 > http://localhost:$HGPORT2 stream-clone-encodedstore | 772 > http://localhost:$HGPORT2 stream-clone-encodedstore |
773 streaming all changes | 773 streaming all changes |
774 29 files to transfer, * of data (glob) (no-rust !) | 774 24 files to transfer, * of data (glob) (no-rust !) |
775 31 files to transfer, * of data (glob) (rust !) | 775 26 files to transfer, * of data (glob) (rust !) |
776 transferred * in * seconds (*) (glob) | 776 transferred * in * seconds (*) (glob) |
777 $ hg -R stream-clone-encodedstore verify -q | 777 $ hg -R stream-clone-encodedstore verify -q |
778 $ cat port-2-errors.log | 778 $ cat port-2-errors.log |
779 | 779 |
780 Stream clone with fncachestore | 780 Stream clone with fncachestore |