changeset 50364:f930af431193 stable

revlog: test more complex file pattern for revlog split There have been a report of failure while splitting revlog. The file name involved was important. The pattern involved here are not problematic, but it help to setup the machinery to test multiple files, the actual fix and problematic file will arrive in a later changeset.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 02 May 2023 21:43:45 +0200
parents b4b1791f36e4
children d1d458fb96a5
files tests/test-transaction-rollback-on-revlog-split.t
diffstat 1 files changed, 24 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-transaction-rollback-on-revlog-split.t	Tue May 02 15:40:13 2023 +0200
+++ b/tests/test-transaction-rollback-on-revlog-split.t	Tue May 02 21:43:45 2023 +0200
@@ -76,13 +76,29 @@
 
   $ hg init troffset-computation
   $ cd troffset-computation
-  $ printf '%20d' '1' > file
+  $ files="
+  > file
+  > Directory_With,Special%Char/Complex_File.babar
+  > foo/bar/babar_celeste/foo
+  > "
+  $ for f in $files; do
+  >     mkdir -p `dirname $f`
+  > done
+  $ for f in $files; do
+  >     printf '%20d' '1' > $f
+  > done
   $ hg commit -Aqma
-  $ printf '%1024d' '1' > file
+  $ for f in $files; do
+  >     printf '%1024d' '1' > $f
+  > done
   $ hg commit -Aqmb
-  $ printf '%20d' '1' > file
+  $ for f in $files; do
+  >     printf '%20d' '1' > $f
+  > done
   $ hg commit -Aqmc
-  $ dd if=/dev/zero of=file bs=1k count=128 > /dev/null 2>&1
+  $ for f in $files; do
+  >     dd if=/dev/zero of=$f bs=1k count=128 > /dev/null 2>&1
+  > done
   $ hg commit -AqmD --traceback
 
 Reference size:
@@ -163,7 +179,7 @@
   $ f -s .hg/store/data/file*
   .hg/store/data/file.i: size=1174
   $ hg tip
-  changeset:   1:cfa8d6e60429
+  changeset:   1:272bd31be9b8
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -233,7 +249,7 @@
   $ f -s .hg/store/data/file*
   .hg/store/data/file.i: size=1174
   $ hg tip
-  changeset:   1:cfa8d6e60429
+  changeset:   1:272bd31be9b8
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -297,7 +313,7 @@
   $ f -s .hg/store/data/file*
   .hg/store/data/file.i: size=1174
   $ hg tip
-  changeset:   1:cfa8d6e60429
+  changeset:   1:272bd31be9b8
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -337,7 +353,7 @@
 
 
   $ hg tip
-  changeset:   1:cfa8d6e60429
+  changeset:   1:272bd31be9b8
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000