test: enable sparse-revlog for test-debugcommands.t
authorBoris Feld <boris.feld@octobus.net>
Mon, 12 Nov 2018 01:04:04 +0100
changeset 53657 e646fda7be2e1dc1b77a8f213730cf33a90c9f3c
parent 53656 5db7efa238bd779e93c0d76677e8a9ca724764a4
child 53658 140d455ef40a461d6ef7aa08256f709c5ae6d969
push id1079
push usergszorc@mozilla.com
push dateMon, 10 Dec 2018 19:44:59 +0000
test: enable sparse-revlog for test-debugcommands.t We are about to enable sparse-revlog globally. To help with reviewing the tests change, we isolate them in individual changesets. Differential Revision: https://phab.mercurial-scm.org/D5318
tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -1,8 +1,14 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ cat << EOF >> $HGRCPATH
   > [ui]
   > interactive=yes
   > EOF
 
   $ hg init debugrevlog
   $ cd debugrevlog
   $ echo a > a
@@ -190,20 +196,20 @@ debugdelta chain basic output
   node trie lookups: 4
   node trie misses: 1
   node trie splits: 1
   revs in memory: 3
 #endif
 
 #if reporevlogstore no-pure
   $ hg debugdeltachain -m
-      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio
-        0       1        1       -1    base         44         43         44   1.02326        44         0    0.00000
-        1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000
-        2       3        1       -1    base         44         43         44   1.02326        44         0    0.00000
+      rev  chain# chainlen     prev   delta       size    rawsize  chainsize     ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
+        0       1        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
+        1       2        1       -1    base          0          0          0   0.00000         0         0    0.00000          0          0   1.00000        1
+        2       3        1       -1    base         44         43         44   1.02326        44         0    0.00000         44         44   1.00000        1
 
   $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n'
   0 1 1
   1 2 1
   2 3 1
 
   $ hg debugdeltachain -m -Tjson
   [
@@ -212,48 +218,60 @@ debugdelta chain basic output
     "chainlen": 1,
     "chainratio": 1.02325581395, (no-py3 !)
     "chainratio": 1.0232558139534884, (py3 !)
     "chainsize": 44,
     "compsize": 44,
     "deltatype": "base",
     "extradist": 0,
     "extraratio": 0.0,
+    "largestblock": 44,
     "lindist": 44,
     "prevrev": -1,
+    "readdensity": 1.0,
+    "readsize": 44,
     "rev": 0,
+    "srchunks": 1,
     "uncompsize": 43
    },
    {
     "chainid": 2,
     "chainlen": 1,
     "chainratio": 0,
     "chainsize": 0,
     "compsize": 0,
     "deltatype": "base",
     "extradist": 0,
     "extraratio": 0,
+    "largestblock": 0,
     "lindist": 0,
     "prevrev": -1,
+    "readdensity": 1,
+    "readsize": 0,
     "rev": 1,
+    "srchunks": 1,
     "uncompsize": 0
    },
    {
     "chainid": 3,
     "chainlen": 1,
     "chainratio": 1.02325581395, (no-py3 !)
     "chainratio": 1.0232558139534884, (py3 !)
     "chainsize": 44,
     "compsize": 44,
     "deltatype": "base",
     "extradist": 0,
     "extraratio": 0.0,
+    "largestblock": 44,
     "lindist": 44,
     "prevrev": -1,
+    "readdensity": 1.0,
+    "readsize": 44,
     "rev": 2,
+    "srchunks": 1,
     "uncompsize": 43
    }
   ]
 
 debugdelta chain with sparse read enabled
 
   $ cat >> $HGRCPATH <<EOF
   > [experimental]
@@ -626,17 +644,17 @@ Test debugpeer
 
   $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" --debug debugpeer ssh://user@dummy/debugrevlog
   running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob) (no-windows !)
   running "*" "*\tests/dummyssh" "user@dummy" "hg -R debugrevlog serve --stdio" (glob) (windows !)
   devel-peer-request: hello+between
   devel-peer-request:   pairs: 81 bytes
   sending hello command
   sending between command
-  remote: 427
-  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  remote: 440
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
   remote: 1
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)
   sending protocaps command
   url: ssh://user@dummy/debugrevlog
   local: no
   pushable: yes