Skip to content
Snippets Groups Projects
Commit 35d5d1d8 authored by Jörg Sonnenberger's avatar Jörg Sonnenberger
Browse files

tests: simplify and extend pull-bundle test using debugbuilddag

Differential Revision: https://phab.mercurial-scm.org/D9443
parent bc1b4eb2
No related branches found
No related tags found
No related merge requests found
......@@ -2,12 +2,6 @@
$ hg init repo
$ cd repo
$ echo foo > foo
$ hg ci -qAm 'add foo'
$ echo >> foo
$ hg ci -m 'change foo'
$ hg up -qC 0
$ echo bar > bar
$ hg ci -qAm 'add bar'
$ hg debugbuilddag '+3<3+1'
$ hg log
......@@ -12,4 +6,4 @@
$ hg log
changeset: 2:effea6de0384
changeset: 3:6100d3090acf
tag: tip
......@@ -15,6 +9,6 @@
tag: tip
parent: 0:bbd179dfa0a7
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: add bar
parent: 0:1ea73414a91b
user: debugbuilddag
date: Thu Jan 01 00:00:03 1970 +0000
summary: r3
......@@ -20,6 +14,6 @@
changeset: 1:ed1b79f46b9a
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: change foo
changeset: 2:01241442b3c2
user: debugbuilddag
date: Thu Jan 01 00:00:02 1970 +0000
summary: r2
......@@ -25,4 +19,9 @@
changeset: 0:bbd179dfa0a7
user: test
changeset: 1:66f7d451a68b
user: debugbuilddag
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
changeset: 0:1ea73414a91b
user: debugbuilddag
date: Thu Jan 01 00:00:00 1970 +0000
......@@ -28,5 +27,5 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: add foo
summary: r0
$ cd ..
......@@ -47,4 +46,6 @@
1 changesets found
$ hg bundle --base 1 -r 2 .hg/2.hg
1 changesets found
$ hg bundle --base 1 -r 3 .hg/3.hg
1 changesets found
$ cat <<EOF > .hg/pullbundles.manifest
......@@ -50,7 +51,8 @@
$ cat <<EOF > .hg/pullbundles.manifest
> 2.hg BUNDLESPEC=none-v2 heads=effea6de0384e684f44435651cb7bd70b8735bd4 bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa
> 1.hg BUNDLESPEC=bzip2-v2 heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa
> 0.hg BUNDLESPEC=gzip-v2 heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa
> 3.hg BUNDLESPEC=none-v2 heads=6100d3090acf50ed11ec23196cec20f5bd7323aa bases=1ea73414a91b0920940797d8fc6a11e447f8ea1e
> 2.hg BUNDLESPEC=none-v2 heads=01241442b3c2bf3211e593b549c655ea65b295e3 bases=66f7d451a68b85ed82ff5fcc254daf50c74144bd
> 1.hg BUNDLESPEC=bzip2-v2 heads=66f7d451a68b85ed82ff5fcc254daf50c74144bd bases=1ea73414a91b0920940797d8fc6a11e447f8ea1e
> 0.hg BUNDLESPEC=gzip-v2 heads=1ea73414a91b0920940797d8fc6a11e447f8ea1e
> EOF
$ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid -E ../error.txt
listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?)
......@@ -60,6 +62,6 @@
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
new changesets bbd179dfa0a7 (1 drafts)
added 1 changesets with 0 changes to 0 files
new changesets 1ea73414a91b (1 drafts)
updating to branch default
......@@ -65,5 +67,5 @@
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat error.txt
$ cd repo.pullbundle
$ hg pull -r 1
......@@ -72,6 +74,6 @@
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
new changesets ed1b79f46b9a (1 drafts)
added 1 changesets with 0 changes to 0 files
new changesets 66f7d451a68b (1 drafts)
(run 'hg update' to get a working copy)
......@@ -77,7 +79,7 @@
(run 'hg update' to get a working copy)
$ hg pull -r 2
$ hg pull -r 3
pulling from http://localhost:$HGPORT2/
searching for changes
adding changesets
adding manifests
adding file changes
......@@ -79,13 +81,13 @@
pulling from http://localhost:$HGPORT2/
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
new changesets effea6de0384 (1 drafts)
added 1 changesets with 0 changes to 0 files (+1 heads)
new changesets 6100d3090acf (1 drafts)
(run 'hg heads' to see heads, 'hg merge' to merge)
$ cd ..
$ killdaemons.py
$ grep 'sending pullbundle ' repo/.hg/blackbox.log
* sending pullbundle "0.hg" (glob)
* sending pullbundle "1.hg" (glob)
......@@ -86,10 +88,10 @@
(run 'hg heads' to see heads, 'hg merge' to merge)
$ cd ..
$ killdaemons.py
$ grep 'sending pullbundle ' repo/.hg/blackbox.log
* sending pullbundle "0.hg" (glob)
* sending pullbundle "1.hg" (glob)
* sending pullbundle "2.hg" (glob)
* sending pullbundle "3.hg" (glob)
$ rm repo/.hg/blackbox.log
Test pullbundle functionality for incremental pulls
......@@ -110,6 +112,9 @@
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 3 files (+1 heads)
new changesets bbd179dfa0a7:ed1b79f46b9a (3 drafts)
adding changesets
adding manifests
adding file changes
added 4 changesets with 0 changes to 0 files (+1 heads)
new changesets 1ea73414a91b:01241442b3c2 (4 drafts)
updating to branch default
......@@ -115,5 +120,5 @@
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ killdaemons.py
$ grep 'sending pullbundle ' repo/.hg/blackbox.log
* sending pullbundle "0.hg" (glob)
......@@ -117,4 +122,6 @@
$ killdaemons.py
$ grep 'sending pullbundle ' repo/.hg/blackbox.log
* sending pullbundle "0.hg" (glob)
* sending pullbundle "3.hg" (glob)
* sending pullbundle "1.hg" (glob)
* sending pullbundle "2.hg" (glob)
......@@ -120,5 +127,4 @@
* sending pullbundle "2.hg" (glob)
* sending pullbundle "1.hg" (glob)
$ rm repo/.hg/blackbox.log
Test pullbundle functionality for incoming
......@@ -132,6 +138,6 @@
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
new changesets bbd179dfa0a7 (1 drafts)
added 1 changesets with 0 changes to 0 files
new changesets 1ea73414a91b (1 drafts)
updating to branch default
......@@ -137,3 +143,3 @@
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd repo.pullbundle2a
......@@ -139,4 +145,4 @@
$ cd repo.pullbundle2a
$ hg incoming -r ed1b79f46b9a
$ hg incoming -r 66f7d451a68b
comparing with http://localhost:$HGPORT2/
searching for changes
......@@ -141,4 +147,4 @@
comparing with http://localhost:$HGPORT2/
searching for changes
changeset: 1:ed1b79f46b9a
changeset: 1:66f7d451a68b
tag: tip
......@@ -144,7 +150,7 @@
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: change foo
user: debugbuilddag
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
$ cd ..
$ killdaemons.py
......@@ -157,8 +163,8 @@
$ cd repo
$ cat <<EOF > .hg/pullbundles.manifest
> 0.hg heads=ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a bases=bbd179dfa0a71671c253b3ae0aa1513b60d199fa
> 0.hg heads=bbd179dfa0a71671c253b3ae0aa1513b60d199fa
> 0.hg heads=66f7d451a68b85ed82ff5fcc254daf50c74144bd bases=1ea73414a91b0920940797d8fc6a11e447f8ea1e
> 0.hg heads=1ea73414a91b0920940797d8fc6a11e447f8ea1e
> EOF
$ hg --config blackbox.track=debug --debug serve -p $HGPORT2 -d --pid-file=../repo.pid
listening at http://*:$HGPORT2/ (bound to $LOCALIP:$HGPORT2) (glob) (?)
......@@ -168,6 +174,6 @@
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
new changesets bbd179dfa0a7 (1 drafts)
added 1 changesets with 0 changes to 0 files
new changesets 1ea73414a91b (1 drafts)
updating to branch default
......@@ -173,5 +179,5 @@
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd repo.pullbundle3
$ hg pull -r 1
pulling from http://localhost:$HGPORT2/
......@@ -179,8 +185,7 @@
adding changesets
adding manifests
adding file changes
added 0 changesets with 0 changes to 1 files
abort: 00changelog.i@ed1b79f46b9a: no node
abort: 00changelog.i@66f7d451a68b: no node
[255]
$ cd ..
$ killdaemons.py
......@@ -193,7 +198,6 @@
$ hg --repo repo debugobsolete ed1b79f46b9a29f5a6efa59cf12fcfca43bead5a
1 new obsolescence markers
obsoleted 1 changesets
$ hg serve --repo repo --config server.view=visible -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
$ hg clone http://localhost:$HGPORT repo-obs
......@@ -204,6 +208,6 @@
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
new changesets bbd179dfa0a7:effea6de0384
added 1 changesets with 0 changes to 0 files
new changesets 1ea73414a91b (1 drafts)
updating to branch default
......@@ -209,3 +213,3 @@
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ killdaemons.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment