changeset 50758:5d77a6f37fe1 stable

fncache: add a test demonstrating fncache corruption
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 13 Jul 2023 19:26:45 +0100
parents 23b0999f6201
children 30381812708d
files tests/test-transaction-rollback-on-revlog-split.t
diffstat 1 files changed, 27 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-transaction-rollback-on-revlog-split.t	Wed Jul 19 21:45:39 2023 +0200
+++ b/tests/test-transaction-rollback-on-revlog-split.t	Thu Jul 13 19:26:45 2023 +0100
@@ -399,7 +399,6 @@
   .hg/store/data/file.d: size=0
   .hg/store/data/file.i: size=1174
 
-
   $ hg tip
   changeset:   1:64b04c8dc267
   tag:         tip
@@ -408,6 +407,33 @@
   summary:     b
   
   $ hg verify -q
+
+  $ cat > .hg/hgrc <<EOF
+  > [hooks]
+  > EOF
+  $ hg pull ../troffset-computation
+  pulling from ../troffset-computation
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 18 changes to 6 files
+  new changesets c99a94cae9b1:64874a3b0160
+  (run 'hg update' to get a working copy)
+
+  $ f -s .hg/store/data*/file*
+  .hg/store/data/file.d: size=267307
+  .hg/store/data/file.i: size=320
+  $ hg verify -q
+   warning: revlog 'data/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/f.d' not in fncache!
+   warning: revlog 'data/Directory_With,Special%Char/Complex_File.babar.d' not in fncache!
+   warning: revlog 'data/file.d' not in fncache!
+   warning: revlog 'data/foo/bar/babar_celeste/foo.d' not in fncache!
+   warning: revlog 'data/some_dir/sub_dir/foo_bar.d' not in fncache!
+   warning: revlog 'data/some_dir/sub_dir/foo_bar.i.s/tutu.d' not in fncache!
+  6 warnings encountered!
+  hint: run "hg debugrebuildfncache" to recover from corrupt fncache
+
   $ cd ..
 
 Read race