##// END OF EJS Templates
bundle: expand the graph we us for bundletype/bundlespec tests...
marmoute -
r51202:3cde8ed5 default
parent child Browse files
Show More
@@ -4,125 +4,196 b' bundle w/o type option'
4 $ hg init t2
4 $ hg init t2
5 $ cd t1
5 $ cd t1
6 $ echo blablablablabla > file.txt
6 $ echo blablablablabla > file.txt
7 $ hg ci -Ama
7 $ hg ci -A -m commit_root
8 adding file.txt
8 adding file.txt
9 $ hg log | grep summary
9 $ echo kapoue > file.txt
10 summary: a
10 $ hg ci -m commit_1
11 $ hg bundle ../b1 ../t2
11 $ echo scrabageul > file.txt
12 $ hg ci -m commit_2
13 $ hg up 'desc("commit_root")'
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 $ echo flagabalagla > file.txt
16 $ hg ci -m commit_3
17 created new head
18 $ echo aliofia > file.txt
19 $ hg ci -m commit_4
20 $ echo alklqo > file.txt
21 $ hg ci -m commit_5
22 $ echo peakfeo > file.txt
23 $ hg ci -m commit_6
24 $ hg log -GT '[{phase}] {desc|firstline}\n'
25 @ [draft] commit_6
26 |
27 o [draft] commit_5
28 |
29 o [draft] commit_4
30 |
31 o [draft] commit_3
32 |
33 | o [draft] commit_2
34 | |
35 | o [draft] commit_1
36 |/
37 o [draft] commit_root
38
39
40 $ hg bundle ../b1.hg ../t2
12 searching for changes
41 searching for changes
13 1 changesets found
42 7 changesets found
43 $ cd ..
14
44
15 $ cd ../t2
45 $ hg -R t2 unbundle ./b1.hg
16 $ hg unbundle ../b1
17 adding changesets
46 adding changesets
18 adding manifests
47 adding manifests
19 adding file changes
48 adding file changes
20 added 1 changesets with 1 changes to 1 files
49 added 7 changesets with 7 changes to 1 files (+1 heads)
21 new changesets c35a0f9217e6 (1 drafts)
50 new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts)
22 (run 'hg update' to get a working copy)
51 (run 'hg heads' to see heads, 'hg merge' to merge)
23 $ hg up
52 $ hg -R t2 up
24 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 $ hg log | grep summary
54 updated to "b9f5f740a8cd: commit_6"
26 summary: a
55 1 other heads for branch "default"
27 $ cd ..
56 $ hg -R t2 log -GT '[{phase}] {desc|firstline}\n'
57 @ [draft] commit_6
58 |
59 o [draft] commit_5
60 |
61 o [draft] commit_4
62 |
63 o [draft] commit_3
64 |
65 | o [draft] commit_2
66 | |
67 | o [draft] commit_1
68 |/
69 o [draft] commit_root
70
28
71
29 Unknown compression type is rejected
72 Unknown compression type is rejected
30
73
31 $ hg init t3
74 $ hg init t3
32 $ cd t3
75 $ hg -R t3 -q unbundle ./b1.hg
33 $ hg -q unbundle ../b1
76 $ hg -R t3 bundle -a -t unknown out.hg
34 $ hg bundle -a -t unknown out.hg
35 abort: unknown is not a recognized bundle specification
77 abort: unknown is not a recognized bundle specification
36 (see 'hg help bundlespec' for supported values for --type)
78 (see 'hg help bundlespec' for supported values for --type)
37 [10]
79 [10]
38
80
39 $ hg bundle -a -t unknown-v2 out.hg
81 $ hg -R t3 bundle -a -t unknown-v2 out.hg
40 abort: unknown compression is not supported
82 abort: unknown compression is not supported
41 (see 'hg help bundlespec' for supported values for --type)
83 (see 'hg help bundlespec' for supported values for --type)
42 [10]
84 [10]
43
85
44 $ cd ..
45
46 test bundle types
86 test bundle types
47
87
48 $ testbundle() {
88 $ testbundle() {
49 > echo % test bundle type $1
89 > echo % test bundle type $1
50 > hg init t$1
90 > hg -R t1 bundle --all --type $1 ./b-$1.hg
51 > cd t1
91 > f -q -B6 -D ./b-$1.hg; echo
52 > hg bundle -t $1 ../b$1 ../t$1
92 > hg debugbundle ./b-$1.hg
53 > f -q -B6 -D ../b$1; echo
93 > hg debugbundle --spec ./b-$1.hg
54 > cd ../t$1
55 > hg debugbundle ../b$1
56 > hg debugbundle --spec ../b$1
57 > echo
94 > echo
58 > cd ..
59 > }
95 > }
60
96
61 $ for t in "None" "bzip2" "gzip" "none-v2" "v2" "v1" "gzip-v1"; do
97 $ for t in "None" "bzip2" "gzip" "none-v2" "v2" "v1" "gzip-v1"; do
62 > testbundle $t
98 > testbundle $t
63 > done
99 > done
64 % test bundle type None
100 % test bundle type None
65 searching for changes
101 7 changesets found
66 1 changesets found
67 HG20\x00\x00 (esc)
102 HG20\x00\x00 (esc)
68 Stream params: {}
103 Stream params: {}
69 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
104 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
70 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
105 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
106 901e97fadc587978ec52f2fa76af4aefc2d191e8
107 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
108 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
109 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
110 2ea90778052ba7558fab36e3fd5d149512ff986b
111 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
71 cache:rev-branch-cache -- {} (mandatory: False)
112 cache:rev-branch-cache -- {} (mandatory: False)
72 none-v2
113 none-v2
73
114
74 % test bundle type bzip2
115 % test bundle type bzip2
75 searching for changes
116 7 changesets found
76 1 changesets found
77 HG20\x00\x00 (esc)
117 HG20\x00\x00 (esc)
78 Stream params: {Compression: BZ}
118 Stream params: {Compression: BZ}
79 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
119 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
80 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
120 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
121 901e97fadc587978ec52f2fa76af4aefc2d191e8
122 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
123 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
124 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
125 2ea90778052ba7558fab36e3fd5d149512ff986b
126 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
81 cache:rev-branch-cache -- {} (mandatory: False)
127 cache:rev-branch-cache -- {} (mandatory: False)
82 bzip2-v2
128 bzip2-v2
83
129
84 % test bundle type gzip
130 % test bundle type gzip
85 searching for changes
131 7 changesets found
86 1 changesets found
87 HG20\x00\x00 (esc)
132 HG20\x00\x00 (esc)
88 Stream params: {Compression: GZ}
133 Stream params: {Compression: GZ}
89 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
134 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
90 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
135 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
136 901e97fadc587978ec52f2fa76af4aefc2d191e8
137 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
138 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
139 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
140 2ea90778052ba7558fab36e3fd5d149512ff986b
141 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
91 cache:rev-branch-cache -- {} (mandatory: False)
142 cache:rev-branch-cache -- {} (mandatory: False)
92 gzip-v2
143 gzip-v2
93
144
94 % test bundle type none-v2
145 % test bundle type none-v2
95 searching for changes
146 7 changesets found
96 1 changesets found
97 HG20\x00\x00 (esc)
147 HG20\x00\x00 (esc)
98 Stream params: {}
148 Stream params: {}
99 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
149 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
100 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
150 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
151 901e97fadc587978ec52f2fa76af4aefc2d191e8
152 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
153 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
154 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
155 2ea90778052ba7558fab36e3fd5d149512ff986b
156 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
101 cache:rev-branch-cache -- {} (mandatory: False)
157 cache:rev-branch-cache -- {} (mandatory: False)
102 none-v2
158 none-v2
103
159
104 % test bundle type v2
160 % test bundle type v2
105 searching for changes
161 7 changesets found
106 1 changesets found
107 HG20\x00\x00 (esc)
162 HG20\x00\x00 (esc)
108 Stream params: {Compression: BZ}
163 Stream params: {Compression: BZ}
109 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
164 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
110 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
165 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
166 901e97fadc587978ec52f2fa76af4aefc2d191e8
167 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
168 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
169 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
170 2ea90778052ba7558fab36e3fd5d149512ff986b
171 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
111 cache:rev-branch-cache -- {} (mandatory: False)
172 cache:rev-branch-cache -- {} (mandatory: False)
112 bzip2-v2
173 bzip2-v2
113
174
114 % test bundle type v1
175 % test bundle type v1
115 searching for changes
176 7 changesets found
116 1 changesets found
117 HG10BZ
177 HG10BZ
118 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
178 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
179 901e97fadc587978ec52f2fa76af4aefc2d191e8
180 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
181 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
182 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
183 2ea90778052ba7558fab36e3fd5d149512ff986b
184 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
119 bzip2-v1
185 bzip2-v1
120
186
121 % test bundle type gzip-v1
187 % test bundle type gzip-v1
122 searching for changes
188 7 changesets found
123 1 changesets found
124 HG10GZ
189 HG10GZ
125 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
190 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
191 901e97fadc587978ec52f2fa76af4aefc2d191e8
192 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
193 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
194 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
195 2ea90778052ba7558fab36e3fd5d149512ff986b
196 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
126 gzip-v1
197 gzip-v1
127
198
128
199
@@ -167,22 +238,32 b' Compression level can be adjusted for bu'
167 > testbundle $t
238 > testbundle $t
168 > done
239 > done
169 % test bundle type zstd
240 % test bundle type zstd
170 searching for changes
241 7 changesets found
171 1 changesets found
172 HG20\x00\x00 (esc)
242 HG20\x00\x00 (esc)
173 Stream params: {Compression: ZS}
243 Stream params: {Compression: ZS}
174 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
244 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
175 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
245 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
246 901e97fadc587978ec52f2fa76af4aefc2d191e8
247 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
248 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
249 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
250 2ea90778052ba7558fab36e3fd5d149512ff986b
251 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
176 cache:rev-branch-cache -- {} (mandatory: False)
252 cache:rev-branch-cache -- {} (mandatory: False)
177 zstd-v2
253 zstd-v2
178
254
179 % test bundle type zstd-v2
255 % test bundle type zstd-v2
180 searching for changes
256 7 changesets found
181 1 changesets found
182 HG20\x00\x00 (esc)
257 HG20\x00\x00 (esc)
183 Stream params: {Compression: ZS}
258 Stream params: {Compression: ZS}
184 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
259 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
185 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
260 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
261 901e97fadc587978ec52f2fa76af4aefc2d191e8
262 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
263 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
264 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
265 2ea90778052ba7558fab36e3fd5d149512ff986b
266 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
186 cache:rev-branch-cache -- {} (mandatory: False)
267 cache:rev-branch-cache -- {} (mandatory: False)
187 zstd-v2
268 zstd-v2
188
269
@@ -192,11 +273,11 b' Explicit request for zstd on non-general'
192 $ hg --config format.usegeneraldelta=false init nogd
273 $ hg --config format.usegeneraldelta=false init nogd
193 $ hg -q -R nogd pull t1
274 $ hg -q -R nogd pull t1
194 $ hg -R nogd bundle -a -t zstd nogd-zstd
275 $ hg -R nogd bundle -a -t zstd nogd-zstd
195 1 changesets found
276 7 changesets found
196
277
197 zstd-v1 always fails
278 zstd-v1 always fails
198
279
199 $ hg -R tzstd bundle -a -t zstd-v1 zstd-v1
280 $ hg -R t1 bundle -a -t zstd-v1 zstd-v1
200 abort: compression engine zstd is not supported on v1 bundles
281 abort: compression engine zstd is not supported on v1 bundles
201 (see 'hg help bundlespec' for supported values for --type)
282 (see 'hg help bundlespec' for supported values for --type)
202 [10]
283 [10]
@@ -243,26 +324,44 b' test invalid bundle type'
243 Test controlling the changegroup version
324 Test controlling the changegroup version
244
325
245 $ hg -R t1 bundle --config experimental.changegroup3=yes -a -t v2 ./v2-cg-default.hg
326 $ hg -R t1 bundle --config experimental.changegroup3=yes -a -t v2 ./v2-cg-default.hg
246 1 changesets found
327 7 changesets found
247 $ hg debugbundle ./v2-cg-default.hg --part-type changegroup
328 $ hg debugbundle ./v2-cg-default.hg --part-type changegroup
248 Stream params: {Compression: BZ}
329 Stream params: {Compression: BZ}
249 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
330 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
250 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
331 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
332 901e97fadc587978ec52f2fa76af4aefc2d191e8
333 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
334 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
335 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
336 2ea90778052ba7558fab36e3fd5d149512ff986b
337 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
251 $ hg debugbundle ./v2-cg-default.hg --spec
338 $ hg debugbundle ./v2-cg-default.hg --spec
252 bzip2-v2
339 bzip2-v2
253 $ hg -R t1 bundle --config experimental.changegroup3=yes -a -t 'v2;cg.version=02' ./v2-cg-02.hg
340 $ hg -R t1 bundle --config experimental.changegroup3=yes -a -t 'v2;cg.version=02' ./v2-cg-02.hg
254 1 changesets found
341 7 changesets found
255 $ hg debugbundle ./v2-cg-02.hg --part-type changegroup
342 $ hg debugbundle ./v2-cg-02.hg --part-type changegroup
256 Stream params: {Compression: BZ}
343 Stream params: {Compression: BZ}
257 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
344 changegroup -- {nbchanges: 7, version: 02} (mandatory: True)
258 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
345 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
346 901e97fadc587978ec52f2fa76af4aefc2d191e8
347 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
348 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
349 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
350 2ea90778052ba7558fab36e3fd5d149512ff986b
351 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
259 $ hg debugbundle ./v2-cg-02.hg --spec
352 $ hg debugbundle ./v2-cg-02.hg --spec
260 bzip2-v2
353 bzip2-v2
261 $ hg -R t1 bundle --config experimental.changegroup3=yes -a -t 'v2;cg.version=03' ./v2-cg-03.hg
354 $ hg -R t1 bundle --config experimental.changegroup3=yes -a -t 'v2;cg.version=03' ./v2-cg-03.hg
262 1 changesets found
355 7 changesets found
263 $ hg debugbundle ./v2-cg-03.hg --part-type changegroup
356 $ hg debugbundle ./v2-cg-03.hg --part-type changegroup
264 Stream params: {Compression: BZ}
357 Stream params: {Compression: BZ}
265 changegroup -- {nbchanges: 1, version: 03} (mandatory: True)
358 changegroup -- {nbchanges: 7, version: 03} (mandatory: True)
266 c35a0f9217e65d1fdb90c936ffa7dbe679f83ddf
359 ac39af4a9f7d2aaa7d244720e57838be9bf63b03
360 901e97fadc587978ec52f2fa76af4aefc2d191e8
361 a8c3a1ed30eb71f03f476c5fa7ead831ef991a55
362 66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d
363 624e609639853fe22c88d42a8fd1f53a0e9b7ebe
364 2ea90778052ba7558fab36e3fd5d149512ff986b
365 b9f5f740a8cd76700020e3903ee55ecff78bd3e5
267 $ hg debugbundle ./v2-cg-03.hg --spec
366 $ hg debugbundle ./v2-cg-03.hg --spec
268 bzip2-v2;cg.version=03
367 bzip2-v2;cg.version=03
General Comments 0
You need to be logged in to leave comments. Login now