Mercurial > hg
changeset 48644:23db8460974b
test-bundle: split each variant in there own section
Having conditional line matching for this kind of big block is quite
inconvenient to update. The new way should be simpler to maintain.
Differential Revision: https://phab.mercurial-scm.org/D12075
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 18 Jan 2022 15:27:51 +0100 |
parents | 1e28c4209fff |
children | ff0233f36f6a |
files | tests/test-bundle.t |
diffstat | 1 files changed, 123 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-bundle.t Mon Jan 24 01:28:16 2022 +0100 +++ b/tests/test-bundle.t Tue Jan 18 15:27:51 2022 +0100 @@ -292,32 +292,56 @@ packed1 is produced properly -#if reporevlogstore + +#if reporevlogstore rust $ hg -R test debugcreatestreamclonebundle packed.hg - writing 2664 bytes for 6 files (no-zstd !) - writing 2665 bytes for 6 files (zstd !) - bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust !) - bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !) + writing 2665 bytes for 6 files + bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog + + $ f -B 64 --size --sha1 --hexdump packed.hg + packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 + 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| + 0010: 00 00 00 00 0a 69 00 36 67 65 6e 65 72 61 6c 64 |.....i.6generald| + 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| + 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 76 31 |nodemap,revlogv1| + $ hg debugbundle --spec packed.hg + none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog +#endif + +#if reporevlogstore no-rust zstd + + $ hg -R test debugcreatestreamclonebundle packed.hg + writing 2665 bytes for 6 files + bundle requirements: generaldelta, revlogv1, sparserevlog $ f -B 64 --size --sha1 --hexdump packed.hg - packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5 (no-zstd !) - packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 (zstd no-rust !) - packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 (rust !) + packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 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 23 67 65 6e 65 72 61 6c 64 |.....h.#generald| (no-zstd !) - 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| (no-zstd !) - 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| (no-zstd !) - 0010: 00 00 00 00 0a 69 00 23 67 65 6e 65 72 61 6c 64 |.....i.#generald| (zstd no-rust !) - 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| (zstd no-rust !) - 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| (zstd no-rust !) - 0010: 00 00 00 00 0a 69 00 36 67 65 6e 65 72 61 6c 64 |.....i.6generald| (rust !) - 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| (rust !) - 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 76 31 |nodemap,revlogv1| (rust !) + 0010: 00 00 00 00 0a 69 00 23 67 65 6e 65 72 61 6c 64 |.....i.#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%2Csparserevlog +#endif + +#if reporevlogstore no-rust no-zstd + $ hg -R test debugcreatestreamclonebundle packed.hg + writing 2664 bytes for 6 files + bundle requirements: generaldelta, revlogv1, sparserevlog + + $ f -B 64 --size --sha1 --hexdump packed.hg + 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 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%2Csparserevlog (no-rust !) - none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog (rust !) + none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog +#endif + +#if reporevlogstore generaldelta requirement is not listed in stream clone bundles unless used @@ -326,25 +350,66 @@ $ touch foo $ hg -q commit -A -m initial $ cd .. + +#endif + +#if reporevlogstore rust + $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg writing 301 bytes for 3 files - bundle requirements: revlogv1 (no-rust !) - bundle requirements: persistent-nodemap, revlogv1 (rust !) + bundle requirements: persistent-nodemap, revlogv1 + + $ f -B 64 --size --sha1 --hexdump packednongd.hg + packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea + 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 1c 70 65 72 73 69 73 74 65 |.....-..persiste| + 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| + 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| + + $ hg debugbundle --spec packednongd.hg + none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 + +#endif + +#if reporevlogstore no-rust zstd + + $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg + writing 301 bytes for 3 files + bundle requirements: revlogv1 $ f -B 64 --size --sha1 --hexdump packednongd.hg - packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f (no-rust !) - packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea (rust !) + 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 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| (no-rust !) - 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| (no-rust !) - 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| (no-rust !) - 0010: 00 00 00 00 01 2d 00 1c 70 65 72 73 69 73 74 65 |.....-..persiste| (rust !) - 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| (rust !) - 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| (rust !) + 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 packednongd.hg - none-packed1;requirements%3Drevlogv1 (no-rust !) - none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 (rust !) + none-packed1;requirements%3Drevlogv1 + + +#endif + +#if reporevlogstore no-rust no-zstd + + $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg + writing 301 bytes for 3 files + bundle requirements: revlogv1 + + $ 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 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 packednongd.hg + none-packed1;requirements%3Drevlogv1 + + +#endif + +#if reporevlogstore Warning emitted when packed bundles contain secret changesets @@ -355,11 +420,36 @@ $ hg phase --force --secret -r . $ cd .. +#endif + +#if reporevlogstore rust + $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg (warning: stream clone bundle will contain secret revisions) writing 301 bytes for 3 files - bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust !) - bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !) + bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog + +#endif + +#if reporevlogstore no-rust zstd + + $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg + (warning: stream clone bundle will contain secret revisions) + writing 301 bytes for 3 files + bundle requirements: generaldelta, revlogv1, sparserevlog + +#endif + +#if reporevlogstore no-rust no-zstd + + $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg + (warning: stream clone bundle will contain secret revisions) + writing 301 bytes for 3 files + bundle requirements: generaldelta, revlogv1, sparserevlog + +#endif + +#if reporevlogstore Unpacking packed1 bundles with "hg unbundle" isn't allowed