changeset 41794:c59987ab96b4 stable

test: don't trust delta bases from the bundle in test-sparse-revlog.t The point of the test is to check the strategy sparse-revlog uses to pick delta base. If we trust the bases used in the bundle, we no longer fully test this logic. In order to force this computation we have to use the side effect of a legacy format configuration `format.generaldelta`. The lack of a more official way to do so will be fixed in a later changeset.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 24 Feb 2019 19:56:51 +0100
parents 2e92624c3613
children b59676077654
files tests/test-sparse-revlog.t
diffstat 1 files changed, 34 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-sparse-revlog.t	Sun Feb 24 19:56:57 2019 +0100
+++ b/tests/test-sparse-revlog.t	Sun Feb 24 19:56:51 2019 +0100
@@ -28,6 +28,8 @@
   > maxchainlen = 15
   > [storage]
   > revlog.optimize-delta-parent-choice = yes
+  > [format]
+  > generaldelta = yes
   > EOF
   $ hg init sparse-repo
   $ cd sparse-repo
@@ -78,7 +80,7 @@
   
 
   $ f -s .hg/store/data/*.d
-  .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=65281524
+  .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=63327412
   $ hg debugrevlog *
   format : 1
   flags  : generaldelta
@@ -90,45 +92,45 @@
       empty     :        0 ( 0.00%)
                      text  :        0 (100.00%)
                      delta :        0 (100.00%)
-      snapshot  :      372 ( 7.44%)
-        lvl-0   :              4 ( 0.08%)
-        lvl-1   :             25 ( 0.50%)
-        lvl-2   :             74 ( 1.48%)
-        lvl-3   :            117 ( 2.34%)
-        lvl-4   :            152 ( 3.04%)
-      deltas    :     4629 (92.56%)
-  revision size : 65281524
-      snapshot  :  9910992 (15.18%)
-        lvl-0   :         804162 ( 1.23%)
-        lvl-1   :        1816378 ( 2.78%)
-        lvl-2   :        2355855 ( 3.61%)
-        lvl-3   :        2557680 ( 3.92%)
-        lvl-4   :        2376917 ( 3.64%)
-      deltas    : 55370532 (84.82%)
+      snapshot  :      383 ( 7.66%)
+        lvl-0   :              3 ( 0.06%)
+        lvl-1   :             20 ( 0.40%)
+        lvl-2   :             68 ( 1.36%)
+        lvl-3   :            112 ( 2.24%)
+        lvl-4   :            180 ( 3.60%)
+      deltas    :     4618 (92.34%)
+  revision size : 63327412
+      snapshot  :  9886710 (15.61%)
+        lvl-0   :         603104 ( 0.95%)
+        lvl-1   :        1559991 ( 2.46%)
+        lvl-2   :        2295592 ( 3.62%)
+        lvl-3   :        2531199 ( 4.00%)
+        lvl-4   :        2896824 ( 4.57%)
+      deltas    : 53440702 (84.39%)
   
   chunks        :     5001
       0x78 (x)  :     5001 (100.00%)
-  chunks size   : 65281524
-      0x78 (x)  : 65281524 (100.00%)
+  chunks size   : 63327412
+      0x78 (x)  : 63327412 (100.00%)
   
   avg chain length  :        9
   max chain length  :       15
-  max chain reach   : 27873839
-  compression ratio :       26
+  max chain reach   : 28248745
+  compression ratio :       27
   
   uncompressed data size (min/max/avg) : 346468 / 346472 / 346471
-  full revision size (min/max/avg)     : 200973 / 201094 / 201040
-  inter-snapshot size (min/max/avg)    : 11586 / 170448 / 24746
-      level-1   (min/max/avg)          : 14021 / 170448 / 72655
-      level-2   (min/max/avg)          : 11616 / 81152 / 31835
-      level-3   (min/max/avg)          : 11607 / 42813 / 21860
-      level-4   (min/max/avg)          : 11586 / 21590 / 15637
-  delta size (min/max/avg)             : 10649 / 166014 / 11961
+  full revision size (min/max/avg)     : 201008 / 201050 / 201034
+  inter-snapshot size (min/max/avg)    : 11596 / 168150 / 24430
+      level-1   (min/max/avg)          : 16653 / 168150 / 77999
+      level-2   (min/max/avg)          : 12951 / 85595 / 33758
+      level-3   (min/max/avg)          : 11608 / 43029 / 22599
+      level-4   (min/max/avg)          : 11596 / 21632 / 16093
+  delta size (min/max/avg)             : 10649 / 107163 / 11572
   
-  deltas against prev  : 3839 (82.93%)
-      where prev = p1  : 3839     (100.00%)
+  deltas against prev  : 3910 (84.67%)
+      where prev = p1  : 3910     (100.00%)
       where prev = p2  :    0     ( 0.00%)
       other            :    0     ( 0.00%)
-  deltas against p1    :  634 (13.70%)
-  deltas against p2    :   62 ( 1.34%)
-  deltas against other :   94 ( 2.03%)
+  deltas against p1    :  648 (14.03%)
+  deltas against p2    :   60 ( 1.30%)
+  deltas against other :    0 ( 0.00%)