diff tests/test-manifest.t @ 41942:fbee66c90cef

manifestcache: only lock the repository if the debug command touch the cache Not doing so had two consequences: 1) the command cannot be run on read only repositories, 2) when using --add on an empty cache, the command crash prematurely trying to read the cache file on disk.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 14 Mar 2019 10:43:01 +0000
parents 70d2d47314e5
children 1e75311d78f7
line wrap: on
line diff
--- a/tests/test-manifest.t	Thu Mar 14 10:24:51 2019 +0000
+++ b/tests/test-manifest.t	Thu Mar 14 10:43:01 2019 +0000
@@ -107,3 +107,15 @@
 
   $ hg debugmanifestfulltextcache
   cache empty
+
+Adding a new persistent entry in the cache
+
+  $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
+  cache contains 1 manifest entries, in order of most to least recent:
+  id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
+  total cache data size 157 bytes, on-disk 157 bytes
+
+  $ hg debugmanifestfulltextcache
+  cache contains 1 manifest entries, in order of most to least recent:
+  id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
+  total cache data size 157 bytes, on-disk 157 bytes