Mercurial > hg
changeset 34363:880e47351d1a
tests: add tests for clone bundles with --uncompressed
Currently, --uncompressed will always clone from the origin server, even
if a stream clone bundle is present. Let's add tests demonstrating
this behavior.
Differential Revision: https://phab.mercurial-scm.org/D832
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 28 Sep 2017 12:17:30 +0200 |
parents | b76937fafe8a |
children | ff406f3e57b2 |
files | tests/test-clonebundles.t |
diffstat | 1 files changed, 70 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-clonebundles.t Wed Sep 27 19:27:41 2017 +0900 +++ b/tests/test-clonebundles.t Thu Sep 28 12:17:30 2017 +0200 @@ -431,3 +431,73 @@ finished applying clone bundle searching for changes no changes found + +Test interaction between clone bundles and --uncompressed + +A manifest with just a gzip bundle + + $ cat > server/.hg/clonebundles.manifest << EOF + > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 + > EOF + + $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip + streaming all changes + 4 files to transfer, 613 bytes of data + transferred 613 bytes in * seconds (*) (glob) + searching for changes + no changes found + +A manifest with a stream clone but no BUNDLESPEC + + $ cat > server/.hg/clonebundles.manifest << EOF + > http://localhost:$HGPORT1/packed.hg + > EOF + + $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-no-bundlespec + streaming all changes + 4 files to transfer, 613 bytes of data + transferred 613 bytes in * seconds (*) (glob) + searching for changes + no changes found + +A manifest with a gzip bundle and a stream clone + + $ cat > server/.hg/clonebundles.manifest << EOF + > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 + > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1 + > EOF + + $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip-packed + streaming all changes + 4 files to transfer, 613 bytes of data + transferred 613 bytes in * seconds (*) (glob) + searching for changes + no changes found + +A manifest with a gzip bundle and stream clone with supported requirements + + $ cat > server/.hg/clonebundles.manifest << EOF + > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 + > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1 + > EOF + + $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip-packed-requirements + streaming all changes + 4 files to transfer, 613 bytes of data + transferred 613 bytes in * seconds (*) (glob) + searching for changes + no changes found + +A manifest with a gzip bundle and a stream clone with unsupported requirements + + $ cat > server/.hg/clonebundles.manifest << EOF + > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 + > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42 + > EOF + + $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements + streaming all changes + 4 files to transfer, 613 bytes of data + transferred 613 bytes in * seconds (*) (glob) + searching for changes + no changes found