test-revlog: adds a non-root revision with a delta against nullrev
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 27 May 2022 02:52:46 +0200
changeset 49238 6aae0e1ecdbc
parent 49237 996a70c75c66
child 49239 a94f28be2e6e
test-revlog: adds a non-root revision with a delta against nullrev Using a revision with non-null parents makes it a different case that is worthy of testing.
tests/bundles/test-revlog-diff-relative-to-nullrev.sh
tests/bundles/test-revlog-diff-relative-to-nullrev.tar
tests/test-revlog.t
--- a/tests/bundles/test-revlog-diff-relative-to-nullrev.sh	Fri May 27 03:14:23 2022 +0200
+++ b/tests/bundles/test-revlog-diff-relative-to-nullrev.sh	Fri May 27 02:52:46 2022 +0200
@@ -27,6 +27,8 @@
 cd nullrev-diff
 echo hi > a
 ../../../hg commit -Am root-B
+echo ho > a
+../../../hg commit -Am child-A
 ../../../hg debugdeltachain a
 rm -rf .hg/cache/ .hg/wcache/
 cd ..
Binary file tests/bundles/test-revlog-diff-relative-to-nullrev.tar has changed
--- a/tests/test-revlog.t	Fri May 27 03:14:23 2022 +0200
+++ b/tests/test-revlog.t	Fri May 27 02:52:46 2022 +0200
@@ -78,6 +78,9 @@
   $ hg debugdeltachain a
       rev      p1      p2  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
         0      -1      -1       1        2       -1      p1         15          3         15   5.00000        15         0    0.00000         15         15   1.00000        1
+        1       0      -1       1        2       -1      p2         15          3         15   5.00000        30        15    1.00000         30         30   0.50000        1
   $ hg cat --config rhg.cat=true -r 0 a
   hi
+  $ hg cat --config rhg.cat=true -r 1 a
+  ho
   $ cd ..