test: enable sparse-revlog for test-bundle.t
authorBoris Feld <boris.feld@octobus.net>
Mon, 12 Nov 2018 01:43:34 +0100
changeset 53654 2c55fd1c14686e27cdaae6f2d146e670fe84d5e7
parent 53653 75728718257e3278e6f753322e98d56c52b2b06e
child 53655 abac9d186e7ec424e82c85415411261ae498d8f9
push id1079
push usergszorc@mozilla.com
push dateMon, 10 Dec 2018 19:44:59 +0000
test: enable sparse-revlog for test-bundle.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/D5315
tests/test-bundle.t
--- a/tests/test-bundle.t
+++ b/tests/test-bundle.t
@@ -1,8 +1,14 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 Setting up test
 
   $ hg init test
   $ cd test
   $ echo 0 > afile
   $ hg add afile
   $ hg commit -m "0.0"
   $ echo 1 >> afile
@@ -270,27 +276,27 @@ Cannot produce streaming clone bundles w
   [255]
 
 packed1 is produced properly
 
 #if reporevlogstore
 
   $ hg -R test debugcreatestreamclonebundle packed.hg
   writing 2664 bytes for 6 files
-  bundle requirements: generaldelta, revlogv1
+  bundle requirements: generaldelta, revlogv1, sparserevlog
 
   $ f -B 64 --size --sha1 --hexdump packed.hg
-  packed.hg: size=2827, sha1=9d14cb90c66a21462d915ab33656f38b9deed686
+  packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5
   0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........|
-  0010: 00 00 00 00 0a 68 00 16 67 65 6e 65 72 61 6c 64 |.....h..generald|
-  0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
-  0030: 74 61 2f 61 64 69 66 66 65 72 65 6e 74 66 69 6c |ta/adifferentfil|
+  0010: 00 00 00 00 0a 68 00 23 67 65 6e 65 72 61 6c 64 |.....h.#generald|
+  0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp|
+  0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/|
 
   $ hg debugbundle --spec packed.hg
-  none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
+  none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog
 
 generaldelta requirement is not listed in stream clone bundles unless used
 
   $ hg --config format.usegeneraldelta=false init testnongd
   $ cd testnongd
   $ touch foo
   $ hg -q commit -A -m initial
   $ cd ..
@@ -315,17 +321,17 @@ Warning emitted when packed bundles cont
   $ touch foo
   $ hg -q commit -A -m initial
   $ hg phase --force --secret -r .
   $ cd ..
 
   $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg
   (warning: stream clone bundle will contain secret revisions)
   writing 301 bytes for 3 files
-  bundle requirements: generaldelta, revlogv1
+  bundle requirements: generaldelta, revlogv1, sparserevlog
 
 Unpacking packed1 bundles with "hg unbundle" isn't allowed
 
   $ hg init packed
   $ hg -R packed unbundle packed.hg
   abort: packed bundles cannot be applied with "hg unbundle"
   (use "hg debugapplystreamclonebundle")
   [255]