Patchwork [3,of,5] tests: actually test non-generaldelta variant for stream clones

login
register
mail settings
Submitter Gregory Szorc
Date Sept. 25, 2016, 8:42 p.m.
Message ID <25fddb8433d383adc567.1474836135@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/16785/
State Accepted
Headers show

Comments

Gregory Szorc - Sept. 25, 2016, 8:42 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1474834855 25200
#      Sun Sep 25 13:20:55 2016 -0700
# Node ID 25fddb8433d383adc567fbe0722878512058561d
# Parent  977c6ae3156075704ff6b925733e726587f3f983
tests: actually test non-generaldelta variant for stream clones

608cabec1b15 accidentally made both tests test generaldelta repos.
Restore the test for a non-gd repo.

Patch

diff --git a/tests/test-bundle.t b/tests/test-bundle.t
--- a/tests/test-bundle.t
+++ b/tests/test-bundle.t
@@ -274,36 +274,36 @@  packed1 is produced properly
   0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........|
   0010: 00 00 00 00 0a 67 00 16 67 65 6e 65 72 61 6c 64 |.....g..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|
 
   $ hg debugbundle --spec packed.hg
   none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
 
-generaldelta requirement is listed in stream clone bundles
+generaldelta requirement is not listed in stream clone bundles unless used
 
-  $ hg --config format.generaldelta=true init testgd
-  $ cd testgd
+  $ hg --config format.usegeneraldelta=false init testnongd
+  $ cd testnongd
   $ touch foo
   $ hg -q commit -A -m initial
   $ cd ..
-  $ hg -R testgd debugcreatestreamclonebundle packedgd.hg
+  $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg
   writing 301 bytes for 3 files
-  bundle requirements: generaldelta, revlogv1
+  bundle requirements: revlogv1
 
-  $ f -B 64 --size --sha1 --hexdump packedgd.hg
-  packedgd.hg: size=396, sha1=981f9e589799335304a5a9a44caa3623a48d2a9f
+  $ f -B 64 --size --sha1 --hexdump packednongd.hg
+  packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f
   0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........|
-  0010: 00 00 00 00 01 2d 00 16 67 65 6e 65 72 61 6c 64 |.....-..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 66 6f 6f 2e 69 00 36 34 0a 00 03 00 01 |ta/foo.i.64.....|
+  0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1|
+  0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..|
+  0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
 
-  $ hg debugbundle --spec packedgd.hg
-  none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
+  $ hg debugbundle --spec packednongd.hg
+  none-packed1;requirements%3Drevlogv1
 
 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]