This test is massive and could probably be split up.
This change essentially requires the revlog store for stream clone
tests and support for bundlerepos for various tests operating
on bundle files.
durin42 |
hg-reviewers |
This test is massive and could probably be split up.
This change essentially requires the revlog store for stream clone
tests and support for bundlerepos for various tests operating
on bundle files.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-bundle.t (35 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Abandoned | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
[1] | [1] | ||||
$ hg -R empty verify | $ hg -R empty verify | ||||
checking changesets | checking changesets | ||||
checking manifests | checking manifests | ||||
crosschecking files in changesets and manifests | crosschecking files in changesets and manifests | ||||
checking files | checking files | ||||
0 files, 0 changesets, 0 total revisions | 0 files, 0 changesets, 0 total revisions | ||||
#if repobundlerepo | |||||
Pull full.hg into test (using --cwd) | Pull full.hg into test (using --cwd) | ||||
$ hg --cwd test pull ../full.hg | $ hg --cwd test pull ../full.hg | ||||
pulling from ../full.hg | pulling from ../full.hg | ||||
searching for changes | searching for changes | ||||
no changes found | no changes found | ||||
Verify that there are no leaked temporary files after pull (issue2797) | Verify that there are no leaked temporary files after pull (issue2797) | ||||
adding changesets | adding changesets | ||||
adding manifests | adding manifests | ||||
adding file changes | adding file changes | ||||
added 9 changesets with 7 changes to 4 files (+1 heads) | added 9 changesets with 7 changes to 4 files (+1 heads) | ||||
new changesets f9ee2f85a263:aa35859c02ea | new changesets f9ee2f85a263:aa35859c02ea | ||||
changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=bundle:empty+full.hg | changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=bundle:empty+full.hg | ||||
(run 'hg heads' to see heads, 'hg merge' to merge) | (run 'hg heads' to see heads, 'hg merge' to merge) | ||||
#endif | |||||
Cannot produce streaming clone bundles with "hg bundle" | Cannot produce streaming clone bundles with "hg bundle" | ||||
$ hg -R test bundle -t packed1 packed.hg | $ hg -R test bundle -t packed1 packed.hg | ||||
abort: packed bundles cannot be produced by "hg bundle" | abort: packed bundles cannot be produced by "hg bundle" | ||||
(use 'hg debugcreatestreamclonebundle') | (use 'hg debugcreatestreamclonebundle') | ||||
[255] | [255] | ||||
packed1 is produced properly | packed1 is produced properly | ||||
#if reporevlogstore | |||||
$ hg -R test debugcreatestreamclonebundle packed.hg | $ hg -R test debugcreatestreamclonebundle packed.hg | ||||
writing 2664 bytes for 6 files | writing 2664 bytes for 6 files | ||||
bundle requirements: generaldelta, revlogv1 | bundle requirements: generaldelta, revlogv1 | ||||
$ f -B 64 --size --sha1 --hexdump packed.hg | $ f -B 64 --size --sha1 --hexdump packed.hg | ||||
packed.hg: size=2827, sha1=9d14cb90c66a21462d915ab33656f38b9deed686 | packed.hg: size=2827, sha1=9d14cb90c66a21462d915ab33656f38b9deed686 | ||||
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| | 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| | 0010: 00 00 00 00 0a 68 00 16 67 65 6e 65 72 61 6c 64 |.....h..generald| | ||||
> EOF | > EOF | ||||
Does not work on non-empty repo | Does not work on non-empty repo | ||||
$ hg -R packed debugapplystreamclonebundle packed.hg | $ hg -R packed debugapplystreamclonebundle packed.hg | ||||
abort: cannot apply stream clone bundle on non-empty repo | abort: cannot apply stream clone bundle on non-empty repo | ||||
[255] | [255] | ||||
#endif | |||||
Create partial clones | Create partial clones | ||||
$ rm -r empty | $ rm -r empty | ||||
$ hg init empty | $ hg init empty | ||||
$ hg clone -r 3 test partial | $ hg clone -r 3 test partial | ||||
adding changesets | adding changesets | ||||
adding manifests | adding manifests | ||||
adding file changes | adding file changes | ||||
added 4 changesets with 4 changes to 1 files | added 4 changesets with 4 changes to 1 files | ||||
new changesets f9ee2f85a263:eebf5a27f8ca | new changesets f9ee2f85a263:eebf5a27f8ca | ||||
updating to branch default | updating to branch default | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg clone partial partial2 | $ hg clone partial partial2 | ||||
updating to branch default | updating to branch default | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd partial | $ cd partial | ||||
#if repobundlerepo | |||||
Log -R full.hg in partial | Log -R full.hg in partial | ||||
$ hg -R bundle://../full.hg log -T phases | $ hg -R bundle://../full.hg log -T phases | ||||
changeset: 8:aa35859c02ea | changeset: 8:aa35859c02ea | ||||
tag: tip | tag: tip | ||||
phase: draft | phase: draft | ||||
parent: 3:eebf5a27f8ca | parent: 3:eebf5a27f8ca | ||||
user: test | user: test | ||||
summary: 0.3m | summary: 0.3m | ||||
Outgoing -R does-not-exist.hg vs partial2 in partial | Outgoing -R does-not-exist.hg vs partial2 in partial | ||||
$ hg -R bundle://../does-not-exist.hg outgoing ../partial2 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 | ||||
abort: *../does-not-exist.hg* (glob) | abort: *../does-not-exist.hg* (glob) | ||||
[255] | [255] | ||||
#endif | |||||
$ cd .. | $ cd .. | ||||
hide outer repo | hide outer repo | ||||
$ hg init | $ hg init | ||||
Direct clone from bundle (all-history) | Direct clone from bundle (all-history) | ||||
#if repobundlerepo | |||||
$ hg clone full.hg full-clone | $ hg clone full.hg full-clone | ||||
requesting all changes | requesting all changes | ||||
adding changesets | adding changesets | ||||
adding manifests | adding manifests | ||||
adding file changes | adding file changes | ||||
added 9 changesets with 7 changes to 4 files (+1 heads) | added 9 changesets with 7 changes to 4 files (+1 heads) | ||||
new changesets f9ee2f85a263:aa35859c02ea | new changesets f9ee2f85a263:aa35859c02ea | ||||
updating to branch default | updating to branch default | ||||
changeset: 3:eebf5a27f8ca | changeset: 3:eebf5a27f8ca | ||||
user: test | user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: 0.3 | summary: 0.3 | ||||
$ cd .. | $ cd .. | ||||
test for 540d1059c802 | #endif | ||||
test for 540d1059c802 | test for 540d1059c802 | ||||
$ hg init orig | $ hg init orig | ||||
$ cd orig | $ cd orig | ||||
$ echo foo > foo | $ echo foo > foo | ||||
$ hg add foo | $ hg add foo | ||||
$ hg ci -m 'add foo' | $ hg ci -m 'add foo' | ||||
$ hg clone . ../copy | $ hg clone . ../copy | ||||
updating to branch default | updating to branch default | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ hg tag foo | $ hg tag foo | ||||
$ cd ../copy | $ cd ../copy | ||||
$ echo >> foo | $ echo >> foo | ||||
$ hg ci -m 'change foo' | $ hg ci -m 'change foo' | ||||
$ hg bundle ../bundle.hg ../orig | $ hg bundle ../bundle.hg ../orig | ||||
searching for changes | searching for changes | ||||
1 changesets found | 1 changesets found | ||||
$ cd ../orig | $ cd .. | ||||
#if repobundlerepo | |||||
$ cd orig | |||||
$ hg incoming ../bundle.hg | $ hg incoming ../bundle.hg | ||||
comparing with ../bundle.hg | comparing with ../bundle.hg | ||||
searching for changes | searching for changes | ||||
changeset: 2:ed1b79f46b9a | changeset: 2:ed1b79f46b9a | ||||
tag: tip | tag: tip | ||||
parent: 0:bbd179dfa0a7 | parent: 0:bbd179dfa0a7 | ||||
user: test | user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
note that percent encoding is not handled: | note that percent encoding is not handled: | ||||
$ hg incoming ../test%23bundle.hg | $ hg incoming ../test%23bundle.hg | ||||
abort: repository ../test%23bundle.hg not found! | abort: repository ../test%23bundle.hg not found! | ||||
[255] | [255] | ||||
$ cd .. | $ cd .. | ||||
#endif | |||||
test to bundle revisions on the newly created branch (issue3828): | test to bundle revisions on the newly created branch (issue3828): | ||||
$ hg -q clone -U test test-clone | $ hg -q clone -U test test-clone | ||||
$ cd test | $ cd test | ||||
$ hg -q branch foo | $ hg -q branch foo | ||||
$ hg commit -m "create foo branch" | $ hg commit -m "create foo branch" | ||||
$ hg -q outgoing ../test-clone | $ hg -q outgoing ../test-clone | ||||
9:b4f5acb1ee27 | 9:b4f5acb1ee27 | ||||
$ hg -q bundle --branch foo foo.hg ../test-clone | $ hg -q bundle --branch foo foo.hg ../test-clone | ||||
#if repobundlerepo | |||||
$ hg -R foo.hg -q log -r "bundle()" | $ hg -R foo.hg -q log -r "bundle()" | ||||
9:b4f5acb1ee27 | 9:b4f5acb1ee27 | ||||
#endif | |||||
$ cd .. | $ cd .. | ||||
test for https://bz.mercurial-scm.org/1144 | test for https://bz.mercurial-scm.org/1144 | ||||
test that verify bundle does not traceback | test that verify bundle does not traceback | ||||
partial history bundle, fails w/ unknown parent | partial history bundle, fails w/ unknown parent | ||||
$ hg -R bundle.hg verify | $ hg -R bundle.hg verify | ||||
abort: 00changelog.i@bbd179dfa0a7: unknown parent! | abort: 00changelog.i@bbd179dfa0a7: unknown parent! | ||||
[255] | [255] | ||||
full history bundle, refuses to verify non-local repo | full history bundle, refuses to verify non-local repo | ||||
#if repobundlerepo | |||||
$ hg -R all.hg verify | $ hg -R all.hg verify | ||||
abort: cannot verify bundle or remote repos | abort: cannot verify bundle or remote repos | ||||
[255] | [255] | ||||
#endif | |||||
but, regular verify must continue to work | but, regular verify must continue to work | ||||
$ hg -R orig verify | $ hg -R orig verify | ||||
checking changesets | checking changesets | ||||
checking manifests | checking manifests | ||||
crosschecking files in changesets and manifests | crosschecking files in changesets and manifests | ||||
checking files | checking files | ||||
2 files, 2 changesets, 2 total revisions | 2 files, 2 changesets, 2 total revisions | ||||
#if repobundlerepo | |||||
diff against bundle | diff against bundle | ||||
$ hg init b | $ hg init b | ||||
$ cd b | $ cd b | ||||
$ hg -R ../all.hg diff -r tip | $ hg -R ../all.hg diff -r tip | ||||
diff -r aa35859c02ea anotherfile | diff -r aa35859c02ea anotherfile | ||||
--- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 | ||||
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||||
@@ -1,4 +0,0 @@ | @@ -1,4 +0,0 @@ | ||||
-0 | -0 | ||||
-1 | -1 | ||||
-2 | -2 | ||||
-3 | -3 | ||||
$ cd .. | $ cd .. | ||||
#endif | |||||
bundle single branch | bundle single branch | ||||
$ hg init branchy | $ hg init branchy | ||||
$ cd branchy | $ cd branchy | ||||
$ echo a >a | $ echo a >a | ||||
$ echo x >x | $ echo x >x | ||||
$ hg ci -Ama | $ hg ci -Ama | ||||
bundling: 2/2 changesets (100.00%) | bundling: 2/2 changesets (100.00%) | ||||
bundling: 1/2 manifests (50.00%) | bundling: 1/2 manifests (50.00%) | ||||
bundling: 2/2 manifests (100.00%) | bundling: 2/2 manifests (100.00%) | ||||
bundling: b 1/3 files (33.33%) | bundling: b 1/3 files (33.33%) | ||||
bundling: b1 2/3 files (66.67%) | bundling: b1 2/3 files (66.67%) | ||||
bundling: x 3/3 files (100.00%) | bundling: x 3/3 files (100.00%) | ||||
bundle2-output-part: "cache:rev-branch-cache" streamed payload | bundle2-output-part: "cache:rev-branch-cache" streamed payload | ||||
#if repobundlerepo | |||||
== Test for issue3441 | == Test for issue3441 | ||||
$ hg clone -q -r0 . part2 | $ hg clone -q -r0 . part2 | ||||
$ hg -q -R part2 pull bundle.hg | $ hg -q -R part2 pull bundle.hg | ||||
$ hg -R part2 verify | $ hg -R part2 verify | ||||
checking changesets | checking changesets | ||||
checking manifests | checking manifests | ||||
crosschecking files in changesets and manifests | crosschecking files in changesets and manifests | ||||
checking files | checking files | ||||
4 files, 3 changesets, 5 total revisions | 4 files, 3 changesets, 5 total revisions | ||||
#endif | |||||
== Test bundling no commits | == Test bundling no commits | ||||
$ hg bundle -r 'public()' no-output.hg | $ hg bundle -r 'public()' no-output.hg | ||||
abort: no commits to bundle | abort: no commits to bundle | ||||
[255] | [255] | ||||
$ cd .. | $ cd .. | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: 1 | | summary: 1 | ||||
| | | | ||||
o changeset: 0:4fe08cd4693e | o changeset: 0:4fe08cd4693e | ||||
user: test | user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: 0 | summary: 0 | ||||
#if repobundlerepo | |||||
$ hg bundle --base 1 -r 3 ../update2bundled.hg | $ hg bundle --base 1 -r 3 ../update2bundled.hg | ||||
1 changesets found | 1 changesets found | ||||
$ hg strip -r 3 | $ hg strip -r 3 | ||||
saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg | saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg | ||||
$ hg merge -R ../update2bundled.hg -r 3 | $ hg merge -R ../update2bundled.hg -r 3 | ||||
setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
(branch merge, don't forget to commit) | (branch merge, don't forget to commit) | ||||
When user updates to the revision existing only in the bundle, | When user updates to the revision existing only in the bundle, | ||||
it should show warning | it should show warning | ||||
$ hg update -R ../update2bundled.hg --clean -r 3 | $ hg update -R ../update2bundled.hg --clean -r 3 | ||||
setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle | ||||
1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | ||||
When user updates to the revision existing in the local repository | When user updates to the revision existing in the local repository | ||||
the warning shouldn't be emitted | the warning shouldn't be emitted | ||||
$ hg update -R ../update2bundled.hg -r 0 | $ hg update -R ../update2bundled.hg -r 0 | ||||
0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
#endif |