Show More
@@ -1,48 +1,114 | |||||
1 | Test creating a consuming stream bundle v2 |
|
1 | Test creating a consuming stream bundle v2 | |
2 |
|
2 | |||
3 | $ getmainid() { |
|
3 | $ getmainid() { | |
4 | > hg -R main log --template '{node}\n' --rev "$1" |
|
4 | > hg -R main log --template '{node}\n' --rev "$1" | |
5 | > } |
|
5 | > } | |
6 |
|
6 | |||
7 | $ cp $HGRCPATH $TESTTMP/hgrc.orig |
|
7 | $ cp $HGRCPATH $TESTTMP/hgrc.orig | |
8 |
|
8 | |||
9 | $ cat >> $HGRCPATH << EOF |
|
9 | $ cat >> $HGRCPATH << EOF | |
10 | > [experimental] |
|
10 | > [experimental] | |
11 | > evolution.createmarkers=True |
|
11 | > evolution.createmarkers=True | |
12 | > evolution.exchange=True |
|
12 | > evolution.exchange=True | |
13 | > bundle2-output-capture=True |
|
13 | > bundle2-output-capture=True | |
14 | > [ui] |
|
14 | > [ui] | |
15 | > ssh="$PYTHON" "$TESTDIR/dummyssh" |
|
15 | > ssh="$PYTHON" "$TESTDIR/dummyssh" | |
16 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
16 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
17 | > [web] |
|
17 | > [web] | |
18 | > push_ssl = false |
|
18 | > push_ssl = false | |
19 | > allow_push = * |
|
19 | > allow_push = * | |
20 | > [phases] |
|
20 | > [phases] | |
21 | > publish=False |
|
21 | > publish=False | |
22 | > [extensions] |
|
22 | > [extensions] | |
23 | > drawdag=$TESTDIR/drawdag.py |
|
23 | > drawdag=$TESTDIR/drawdag.py | |
|
24 | > clonebundles= | |||
24 | > EOF |
|
25 | > EOF | |
25 |
|
26 | |||
26 | The extension requires a repo (currently unused) |
|
27 | The extension requires a repo (currently unused) | |
27 |
|
28 | |||
28 | $ hg init main |
|
29 | $ hg init main | |
29 | $ cd main |
|
30 | $ cd main | |
30 |
|
31 | |||
31 | $ hg debugdrawdag <<'EOF' |
|
32 | $ hg debugdrawdag <<'EOF' | |
32 | > E |
|
33 | > E | |
33 | > | |
|
34 | > | | |
34 | > D |
|
35 | > D | |
35 | > | |
|
36 | > | | |
36 | > C |
|
37 | > C | |
37 | > | |
|
38 | > | | |
38 | > B |
|
39 | > B | |
39 | > | |
|
40 | > | | |
40 | > A |
|
41 | > A | |
41 | > EOF |
|
42 | > EOF | |
42 |
|
43 | |||
43 | $ hg bundle -a --type="none-v2;stream=v2" bundle.hg |
|
44 | $ hg bundle -a --type="none-v2;stream=v2" bundle.hg | |
44 | $ hg debugbundle bundle.hg |
|
45 | $ hg debugbundle bundle.hg | |
45 | Stream params: {} |
|
46 | Stream params: {} | |
46 | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore} |
|
47 | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore} | |
47 | $ hg debugbundle --spec bundle.hg |
|
48 | $ hg debugbundle --spec bundle.hg | |
48 | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore |
|
49 | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore | |
|
50 | ||||
|
51 | Test that we can apply the bundle as a stream clone bundle | |||
|
52 | ||||
|
53 | $ cat > .hg/clonebundles.manifest << EOF | |||
|
54 | > http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec bundle.hg` | |||
|
55 | > EOF | |||
|
56 | ||||
|
57 | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | |||
|
58 | $ cat hg.pid >> $DAEMON_PIDS | |||
|
59 | ||||
|
60 | $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid | |||
|
61 | $ cat http.pid >> $DAEMON_PIDS | |||
|
62 | ||||
|
63 | $ cd .. | |||
|
64 | $ hg clone http://localhost:$HGPORT streamv2-clone-implicit --debug | |||
|
65 | using http://localhost:$HGPORT/ | |||
|
66 | sending capabilities command | |||
|
67 | sending clonebundles command | |||
|
68 | applying clone bundle from http://localhost:$HGPORT1/bundle.hg | |||
|
69 | bundle2-input-bundle: with-transaction | |||
|
70 | bundle2-input-part: "stream2" (params: 3 mandatory) supported | |||
|
71 | applying stream bundle | |||
|
72 | 11 files to transfer, 1.65 KB of data | |||
|
73 | adding [s] data/A.i (66 bytes) | |||
|
74 | adding [s] data/B.i (66 bytes) | |||
|
75 | adding [s] data/C.i (66 bytes) | |||
|
76 | adding [s] data/D.i (66 bytes) | |||
|
77 | adding [s] data/E.i (66 bytes) | |||
|
78 | adding [s] 00manifest.i (584 bytes) | |||
|
79 | adding [s] 00changelog.i (595 bytes) | |||
|
80 | adding [s] phaseroots (43 bytes) | |||
|
81 | adding [c] branch2-served (94 bytes) | |||
|
82 | adding [c] rbc-names-v1 (7 bytes) | |||
|
83 | adding [c] rbc-revs-v1 (40 bytes) | |||
|
84 | transferred 1.65 KB in \d\.\d seconds \(.*/sec\) (re) | |||
|
85 | bundle2-input-part: total payload size 1840 | |||
|
86 | bundle2-input-bundle: 0 parts total | |||
|
87 | finished applying clone bundle | |||
|
88 | query 1; heads | |||
|
89 | sending batch command | |||
|
90 | searching for changes | |||
|
91 | all remote heads known locally | |||
|
92 | no changes found | |||
|
93 | sending getbundle command | |||
|
94 | bundle2-input-bundle: with-transaction | |||
|
95 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |||
|
96 | bundle2-input-part: "phase-heads" supported | |||
|
97 | bundle2-input-part: total payload size 24 | |||
|
98 | bundle2-input-bundle: 1 parts total | |||
|
99 | checking for updated bookmarks | |||
|
100 | updating to branch default | |||
|
101 | resolving manifests | |||
|
102 | branchmerge: False, force: False, partial: False | |||
|
103 | ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041 | |||
|
104 | A: remote created -> g | |||
|
105 | getting A | |||
|
106 | B: remote created -> g | |||
|
107 | getting B | |||
|
108 | C: remote created -> g | |||
|
109 | getting C | |||
|
110 | D: remote created -> g | |||
|
111 | getting D | |||
|
112 | E: remote created -> g | |||
|
113 | getting E | |||
|
114 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now