# HG changeset patch # User Pierre-Yves David # Date 1552561133 0 # Node ID 5b77847bdf09f7f57ea0cc56ad8e6cdcb9c73ac2 # Parent 7436653d8542592c06ea5b3ca470f629179c51f4 manifestcache: make sure the entry are ordered by access time This is an LRU cache, let us make sure of that. diff -r 7436653d8542 -r 5b77847bdf09 tests/test-manifest.t --- a/tests/test-manifest.t Thu Mar 14 09:12:27 2019 +0000 +++ b/tests/test-manifest.t Thu Mar 14 10:58:53 2019 +0000 @@ -133,3 +133,12 @@ id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes total cache data size 268 bytes, on-disk 268 bytes + +Accessing the initial entry again, refresh their order + + $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 + $ hg debugmanifestfulltextcache + cache contains 2 manifest entries, in order of most to least recent: + id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes + id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes + total cache data size 268 bytes, on-disk 268 bytes