[PATCH 3 of 8 "] manifestcache: test the cache is warm after a commit

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sat Mar 16 06:36:24 EDT 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1552563978 0
#      Thu Mar 14 11:46:18 2019 +0000
# Node ID 6c22a53a7afe8b4b46989a62a71b7fc1c4e11ec6
# Parent  a0db76493f2b874b666b67ed50609b0651cedc11
# EXP-Topic manifestcache
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6c22a53a7afe
manifestcache: test the cache is warm after a commit

diff --git a/tests/test-manifest.t b/tests/test-manifest.t
--- a/tests/test-manifest.t
+++ b/tests/test-manifest.t
@@ -158,3 +158,24 @@ Check adding multiple entry in one go:
   id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
   total cache data size 268 bytes, on-disk 268 bytes
   $ hg debugmanifestfulltextcache --clear
+
+Test caching behavior on actual operation
+-----------------------------------------
+
+Make sure we start empty
+
+  $ hg debugmanifestfulltextcache
+  cache empty
+
+Commit should have the new node cached:
+
+  $ echo a >> b/a
+  $ hg commit -m 'foo'
+  $ hg debugmanifestfulltextcache
+  cache contains 2 manifest entries, in order of most to least recent:
+  id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes
+  id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
+  total cache data size 314 bytes, on-disk 314 bytes
+  $ hg log -r 'ancestors(., 1)' --debug | grep 'manifest:'
+  manifest:    1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
+  manifest:    2:26b8653b67af8c1a0a0317c4ee8dac50a41fdb65


More information about the Mercurial-devel mailing list