| 1 |
bundle w/o type option |
| 2 |
|
| 3 |
$ hg init t1 |
| 4 |
$ hg init t2 |
| 5 |
$ cd t1 |
| 6 |
$ echo blablablablabla > file.txt |
| 7 |
$ hg ci -A -m commit_root |
| 8 |
adding file.txt |
| 9 |
$ echo kapoue > file.txt |
| 10 |
$ hg ci -m commit_1 |
| 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 --secret |
| 24 |
$ hg phase --public --rev 'desc(commit_3)' |
| 25 |
$ hg log -GT '[{phase}] {desc|firstline}\n' |
| 26 |
@ [secret] commit_6 |
| 27 |
| |
| 28 |
o [draft] commit_5 |
| 29 |
| |
| 30 |
o [draft] commit_4 |
| 31 |
| |
| 32 |
o [public] commit_3 |
| 33 |
| |
| 34 |
| o [draft] commit_2 |
| 35 |
| | |
| 36 |
| o [draft] commit_1 |
| 37 |
|/ |
| 38 |
o [public] commit_root |
| 39 |
|
| 40 |
|
| 41 |
XXX the bundle generation is defined by a discovery round here. So the secret |
| 42 |
changeset should be excluded. |
| 43 |
|
| 44 |
$ hg bundle ../b1.hg ../t2 |
| 45 |
searching for changes |
| 46 |
7 changesets found (known-bad-output !) |
| 47 |
6 changesets found (missing-correct-output !) |
| 48 |
$ cd .. |
| 49 |
|
| 50 |
$ hg -R t2 unbundle ./b1.hg |
| 51 |
adding changesets |
| 52 |
adding manifests |
| 53 |
adding file changes |
| 54 |
added 7 changesets with 7 changes to 1 files (+1 heads) (known-bad-output !) |
| 55 |
added 6 changesets with 6 changes to 1 files (+1 heads) (missing-correct-output !) |
| 56 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 57 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 58 |
$ hg -R t2 up |
| 59 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 60 |
updated to "b9f5f740a8cd: commit_6" |
| 61 |
1 other heads for branch "default" |
| 62 |
$ hg -R t2 log -GT '[{phase}] {desc|firstline}\n' |
| 63 |
@ [draft] commit_6 (known-bad-output !) |
| 64 |
| (known-bad-output !) |
| 65 |
o [draft] commit_5 |
| 66 |
| |
| 67 |
o [draft] commit_4 |
| 68 |
| |
| 69 |
o [draft] commit_3 |
| 70 |
| |
| 71 |
| o [draft] commit_2 |
| 72 |
| | |
| 73 |
| o [draft] commit_1 |
| 74 |
|/ |
| 75 |
o [draft] commit_root |
| 76 |
|
| 77 |
|
| 78 |
Unknown compression type is rejected |
| 79 |
|
| 80 |
$ hg init t3 |
| 81 |
$ hg -R t3 -q unbundle ./b1.hg |
| 82 |
$ hg -R t3 bundle -a -t unknown out.hg |
| 83 |
abort: unknown is not a recognized bundle specification |
| 84 |
(see 'hg help bundlespec' for supported values for --type) |
| 85 |
[10] |
| 86 |
|
| 87 |
$ hg -R t3 bundle -a -t unknown-v2 out.hg |
| 88 |
abort: unknown compression is not supported |
| 89 |
(see 'hg help bundlespec' for supported values for --type) |
| 90 |
[10] |
| 91 |
|
| 92 |
test bundle types |
| 93 |
================= |
| 94 |
|
| 95 |
since we use --all, it is okay to include the secret changeset here. It is |
| 96 |
unfortunate that the phase information for the secret one is lost. |
| 97 |
|
| 98 |
$ testbundle() { |
| 99 |
> echo % test bundle type $1 |
| 100 |
> echo '===================================' |
| 101 |
> hg -R t1 bundle --all --type $1 ./b-$1.hg |
| 102 |
> f -q -B6 -D ./b-$1.hg; echo |
| 103 |
> hg debugbundle ./b-$1.hg |
| 104 |
> hg debugbundle --spec ./b-$1.hg |
| 105 |
> echo |
| 106 |
> hg init repo-from-type-$1 |
| 107 |
> hg unbundle -R repo-from-type-$1 ./b-$1.hg |
| 108 |
> hg -R repo-from-type-$1 log -GT '[{phase}] {desc|firstline}\n' |
| 109 |
> echo |
| 110 |
> } |
| 111 |
|
| 112 |
$ for t in "None" "bzip2" "gzip" "none-v2" "v2" "v1" "gzip-v1" "v3"; do |
| 113 |
> testbundle $t |
| 114 |
> done |
| 115 |
% test bundle type None |
| 116 |
=================================== |
| 117 |
7 changesets found |
| 118 |
HG20\x00\x00 (esc) |
| 119 |
Stream params: {} |
| 120 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 121 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 122 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 123 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 124 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 125 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 126 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 127 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 128 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 129 |
none-v2 |
| 130 |
|
| 131 |
adding changesets |
| 132 |
adding manifests |
| 133 |
adding file changes |
| 134 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 135 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 136 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 137 |
o [draft] commit_6 |
| 138 |
| |
| 139 |
o [draft] commit_5 |
| 140 |
| |
| 141 |
o [draft] commit_4 |
| 142 |
| |
| 143 |
o [draft] commit_3 |
| 144 |
| |
| 145 |
| o [draft] commit_2 |
| 146 |
| | |
| 147 |
| o [draft] commit_1 |
| 148 |
|/ |
| 149 |
o [draft] commit_root |
| 150 |
|
| 151 |
|
| 152 |
% test bundle type bzip2 |
| 153 |
=================================== |
| 154 |
7 changesets found |
| 155 |
HG20\x00\x00 (esc) |
| 156 |
Stream params: {Compression: BZ} |
| 157 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 158 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 159 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 160 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 161 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 162 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 163 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 164 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 165 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 166 |
bzip2-v2 |
| 167 |
|
| 168 |
adding changesets |
| 169 |
adding manifests |
| 170 |
adding file changes |
| 171 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 172 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 173 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 174 |
o [draft] commit_6 |
| 175 |
| |
| 176 |
o [draft] commit_5 |
| 177 |
| |
| 178 |
o [draft] commit_4 |
| 179 |
| |
| 180 |
o [draft] commit_3 |
| 181 |
| |
| 182 |
| o [draft] commit_2 |
| 183 |
| | |
| 184 |
| o [draft] commit_1 |
| 185 |
|/ |
| 186 |
o [draft] commit_root |
| 187 |
|
| 188 |
|
| 189 |
% test bundle type gzip |
| 190 |
=================================== |
| 191 |
7 changesets found |
| 192 |
HG20\x00\x00 (esc) |
| 193 |
Stream params: {Compression: GZ} |
| 194 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 195 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 196 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 197 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 198 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 199 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 200 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 201 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 202 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 203 |
gzip-v2 |
| 204 |
|
| 205 |
adding changesets |
| 206 |
adding manifests |
| 207 |
adding file changes |
| 208 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 209 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 210 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 211 |
o [draft] commit_6 |
| 212 |
| |
| 213 |
o [draft] commit_5 |
| 214 |
| |
| 215 |
o [draft] commit_4 |
| 216 |
| |
| 217 |
o [draft] commit_3 |
| 218 |
| |
| 219 |
| o [draft] commit_2 |
| 220 |
| | |
| 221 |
| o [draft] commit_1 |
| 222 |
|/ |
| 223 |
o [draft] commit_root |
| 224 |
|
| 225 |
|
| 226 |
% test bundle type none-v2 |
| 227 |
=================================== |
| 228 |
7 changesets found |
| 229 |
HG20\x00\x00 (esc) |
| 230 |
Stream params: {} |
| 231 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 232 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 233 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 234 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 235 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 236 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 237 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 238 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 239 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 240 |
none-v2 |
| 241 |
|
| 242 |
adding changesets |
| 243 |
adding manifests |
| 244 |
adding file changes |
| 245 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 246 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 247 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 248 |
o [draft] commit_6 |
| 249 |
| |
| 250 |
o [draft] commit_5 |
| 251 |
| |
| 252 |
o [draft] commit_4 |
| 253 |
| |
| 254 |
o [draft] commit_3 |
| 255 |
| |
| 256 |
| o [draft] commit_2 |
| 257 |
| | |
| 258 |
| o [draft] commit_1 |
| 259 |
|/ |
| 260 |
o [draft] commit_root |
| 261 |
|
| 262 |
|
| 263 |
% test bundle type v2 |
| 264 |
=================================== |
| 265 |
7 changesets found |
| 266 |
HG20\x00\x00 (esc) |
| 267 |
Stream params: {Compression: BZ} |
| 268 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 269 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 270 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 271 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 272 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 273 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 274 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 275 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 276 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 277 |
bzip2-v2 |
| 278 |
|
| 279 |
adding changesets |
| 280 |
adding manifests |
| 281 |
adding file changes |
| 282 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 283 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 284 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 285 |
o [draft] commit_6 |
| 286 |
| |
| 287 |
o [draft] commit_5 |
| 288 |
| |
| 289 |
o [draft] commit_4 |
| 290 |
| |
| 291 |
o [draft] commit_3 |
| 292 |
| |
| 293 |
| o [draft] commit_2 |
| 294 |
| | |
| 295 |
| o [draft] commit_1 |
| 296 |
|/ |
| 297 |
o [draft] commit_root |
| 298 |
|
| 299 |
|
| 300 |
% test bundle type v1 |
| 301 |
=================================== |
| 302 |
7 changesets found |
| 303 |
HG10BZ |
| 304 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 305 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 306 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 307 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 308 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 309 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 310 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 311 |
bzip2-v1 |
| 312 |
|
| 313 |
adding changesets |
| 314 |
adding manifests |
| 315 |
adding file changes |
| 316 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 317 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 318 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 319 |
o [draft] commit_6 |
| 320 |
| |
| 321 |
o [draft] commit_5 |
| 322 |
| |
| 323 |
o [draft] commit_4 |
| 324 |
| |
| 325 |
o [draft] commit_3 |
| 326 |
| |
| 327 |
| o [draft] commit_2 |
| 328 |
| | |
| 329 |
| o [draft] commit_1 |
| 330 |
|/ |
| 331 |
o [draft] commit_root |
| 332 |
|
| 333 |
|
| 334 |
% test bundle type gzip-v1 |
| 335 |
=================================== |
| 336 |
7 changesets found |
| 337 |
HG10GZ |
| 338 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 339 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 340 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 341 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 342 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 343 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 344 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 345 |
gzip-v1 |
| 346 |
|
| 347 |
adding changesets |
| 348 |
adding manifests |
| 349 |
adding file changes |
| 350 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 351 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 352 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 353 |
o [draft] commit_6 |
| 354 |
| |
| 355 |
o [draft] commit_5 |
| 356 |
| |
| 357 |
o [draft] commit_4 |
| 358 |
| |
| 359 |
o [draft] commit_3 |
| 360 |
| |
| 361 |
| o [draft] commit_2 |
| 362 |
| | |
| 363 |
| o [draft] commit_1 |
| 364 |
|/ |
| 365 |
o [draft] commit_root |
| 366 |
|
| 367 |
|
| 368 |
% test bundle type v3 |
| 369 |
=================================== |
| 370 |
7 changesets found |
| 371 |
HG20\x00\x00 (esc) |
| 372 |
Stream params: {Compression: BZ} |
| 373 |
changegroup -- {nbchanges: 7, targetphase: 2, version: 03} (mandatory: True) |
| 374 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 375 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 376 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 377 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 378 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 379 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 380 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 381 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 382 |
phase-heads -- {} (mandatory: True) |
| 383 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d public |
| 384 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 draft |
| 385 |
2ea90778052ba7558fab36e3fd5d149512ff986b draft |
| 386 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 secret |
| 387 |
bzip2-v2;cg.version=03 |
| 388 |
|
| 389 |
adding changesets |
| 390 |
adding manifests |
| 391 |
adding file changes |
| 392 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 393 |
new changesets ac39af4a9f7d:b9f5f740a8cd (4 drafts, 1 secrets) |
| 394 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 395 |
o [secret] commit_6 |
| 396 |
| |
| 397 |
o [draft] commit_5 |
| 398 |
| |
| 399 |
o [draft] commit_4 |
| 400 |
| |
| 401 |
o [public] commit_3 |
| 402 |
| |
| 403 |
| o [draft] commit_2 |
| 404 |
| | |
| 405 |
| o [draft] commit_1 |
| 406 |
|/ |
| 407 |
o [public] commit_root |
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
Compression level can be adjusted for bundle2 bundles |
| 412 |
|
| 413 |
$ hg init test-complevel |
| 414 |
$ cd test-complevel |
| 415 |
|
| 416 |
$ cat > file0 << EOF |
| 417 |
> this is a file |
| 418 |
> with some text |
| 419 |
> and some more text |
| 420 |
> and other content |
| 421 |
> EOF |
| 422 |
$ cat > file1 << EOF |
| 423 |
> this is another file |
| 424 |
> with some other content |
| 425 |
> and repeated, repeated, repeated, repeated content |
| 426 |
> EOF |
| 427 |
$ hg -q commit -A -m initial |
| 428 |
|
| 429 |
$ hg bundle -a -t gzip-v2 gzip-v2.hg |
| 430 |
1 changesets found |
| 431 |
$ f --size gzip-v2.hg |
| 432 |
gzip-v2.hg: size=468 |
| 433 |
|
| 434 |
$ hg --config experimental.bundlecomplevel=1 bundle -a -t gzip-v2 gzip-v2-level1.hg |
| 435 |
1 changesets found |
| 436 |
$ f --size gzip-v2-level1.hg |
| 437 |
gzip-v2-level1.hg: size=475 |
| 438 |
|
| 439 |
$ hg --config experimental.bundlecomplevel.gzip=1 --config experimental.bundlelevel=9 bundle -a -t gzip-v2 gzip-v2-level1.hg |
| 440 |
1 changesets found |
| 441 |
$ f --size gzip-v2-level1.hg |
| 442 |
gzip-v2-level1.hg: size=475 |
| 443 |
|
| 444 |
$ cd .. |
| 445 |
|
| 446 |
#if zstd |
| 447 |
|
| 448 |
$ for t in "zstd" "zstd-v2"; do |
| 449 |
> testbundle $t |
| 450 |
> done |
| 451 |
% test bundle type zstd |
| 452 |
=================================== |
| 453 |
7 changesets found |
| 454 |
HG20\x00\x00 (esc) |
| 455 |
Stream params: {Compression: ZS} |
| 456 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 457 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 458 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 459 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 460 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 461 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 462 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 463 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 464 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 465 |
zstd-v2 |
| 466 |
|
| 467 |
adding changesets |
| 468 |
adding manifests |
| 469 |
adding file changes |
| 470 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 471 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 472 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 473 |
o [draft] commit_6 |
| 474 |
| |
| 475 |
o [draft] commit_5 |
| 476 |
| |
| 477 |
o [draft] commit_4 |
| 478 |
| |
| 479 |
o [draft] commit_3 |
| 480 |
| |
| 481 |
| o [draft] commit_2 |
| 482 |
| | |
| 483 |
| o [draft] commit_1 |
| 484 |
|/ |
| 485 |
o [draft] commit_root |
| 486 |
|
| 487 |
|
| 488 |
% test bundle type zstd-v2 |
| 489 |
=================================== |
| 490 |
7 changesets found |
| 491 |
HG20\x00\x00 (esc) |
| 492 |
Stream params: {Compression: ZS} |
| 493 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 494 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 495 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 496 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 497 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 498 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 499 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 500 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 501 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 502 |
zstd-v2 |
| 503 |
|
| 504 |
adding changesets |
| 505 |
adding manifests |
| 506 |
adding file changes |
| 507 |
added 7 changesets with 7 changes to 1 files (+1 heads) |
| 508 |
new changesets ac39af4a9f7d:b9f5f740a8cd (7 drafts) |
| 509 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 510 |
o [draft] commit_6 |
| 511 |
| |
| 512 |
o [draft] commit_5 |
| 513 |
| |
| 514 |
o [draft] commit_4 |
| 515 |
| |
| 516 |
o [draft] commit_3 |
| 517 |
| |
| 518 |
| o [draft] commit_2 |
| 519 |
| | |
| 520 |
| o [draft] commit_1 |
| 521 |
|/ |
| 522 |
o [draft] commit_root |
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
Explicit request for zstd on non-generaldelta repos |
| 527 |
|
| 528 |
$ hg --config format.usegeneraldelta=false init nogd |
| 529 |
$ hg -q -R nogd pull t1 |
| 530 |
$ hg -R nogd bundle -a -t zstd nogd-zstd |
| 531 |
6 changesets found |
| 532 |
|
| 533 |
zstd-v1 always fails |
| 534 |
|
| 535 |
$ hg -R t1 bundle -a -t zstd-v1 zstd-v1 |
| 536 |
abort: compression engine zstd is not supported on v1 bundles |
| 537 |
(see 'hg help bundlespec' for supported values for --type) |
| 538 |
[10] |
| 539 |
|
| 540 |
zstd supports threading |
| 541 |
|
| 542 |
$ hg init test-compthreads |
| 543 |
$ cd test-compthreads |
| 544 |
$ hg debugbuilddag +3 |
| 545 |
$ hg --config experimental.bundlecompthreads=1 bundle -a -t zstd-v2 zstd-v2-threaded.hg |
| 546 |
3 changesets found |
| 547 |
$ cd .. |
| 548 |
|
| 549 |
#else |
| 550 |
|
| 551 |
zstd is a valid engine but isn't available |
| 552 |
|
| 553 |
$ hg -R t1 bundle -a -t zstd irrelevant.hg |
| 554 |
abort: compression engine zstd could not be loaded |
| 555 |
[255] |
| 556 |
|
| 557 |
#endif |
| 558 |
|
| 559 |
test garbage file |
| 560 |
|
| 561 |
$ echo garbage > bgarbage |
| 562 |
$ hg init tgarbage |
| 563 |
$ cd tgarbage |
| 564 |
$ hg pull ../bgarbage |
| 565 |
pulling from ../bgarbage |
| 566 |
abort: ../bgarbage: not a Mercurial bundle |
| 567 |
[255] |
| 568 |
$ cd .. |
| 569 |
|
| 570 |
test invalid bundle type |
| 571 |
|
| 572 |
$ cd t1 |
| 573 |
$ hg bundle -a -t garbage ../bgarbage |
| 574 |
abort: garbage is not a recognized bundle specification |
| 575 |
(see 'hg help bundlespec' for supported values for --type) |
| 576 |
[10] |
| 577 |
$ cd .. |
| 578 |
|
| 579 |
Test controlling the changegroup version |
| 580 |
|
| 581 |
$ hg -R t1 bundle -a -t v2 ./v2-cg-default.hg |
| 582 |
7 changesets found |
| 583 |
$ hg debugbundle ./v2-cg-default.hg --part-type changegroup |
| 584 |
Stream params: {Compression: BZ} |
| 585 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 586 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 587 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 588 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 589 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 590 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 591 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 592 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 593 |
$ hg debugbundle ./v2-cg-default.hg --spec |
| 594 |
bzip2-v2 |
| 595 |
$ hg -R t1 bundle -a -t 'v2;cg.version=02' ./v2-cg-02.hg |
| 596 |
7 changesets found |
| 597 |
$ hg debugbundle ./v2-cg-02.hg --part-type changegroup |
| 598 |
Stream params: {Compression: BZ} |
| 599 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 600 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 601 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 602 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 603 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 604 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 605 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 606 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 607 |
$ hg debugbundle ./v2-cg-02.hg --spec |
| 608 |
bzip2-v2 |
| 609 |
$ hg -R t1 bundle -a -t 'v2;cg.version=03' ./v2-cg-03.hg |
| 610 |
7 changesets found |
| 611 |
$ hg debugbundle ./v2-cg-03.hg --part-type changegroup |
| 612 |
Stream params: {Compression: BZ} |
| 613 |
changegroup -- {nbchanges: 7, version: 03} (mandatory: True) |
| 614 |
ac39af4a9f7d2aaa7d244720e57838be9bf63b03 |
| 615 |
901e97fadc587978ec52f2fa76af4aefc2d191e8 |
| 616 |
a8c3a1ed30eb71f03f476c5fa7ead831ef991a55 |
| 617 |
66e2c4b43e0cf8f0bdff0733a0b97ce57874e35d |
| 618 |
624e609639853fe22c88d42a8fd1f53a0e9b7ebe |
| 619 |
2ea90778052ba7558fab36e3fd5d149512ff986b |
| 620 |
b9f5f740a8cd76700020e3903ee55ecff78bd3e5 |
| 621 |
$ hg debugbundle ./v2-cg-03.hg --spec |
| 622 |
bzip2-v2;cg.version=03 |
| 623 |
|
| 624 |
Test changegroupv4 variants |
| 625 |
--------------------------- |
| 626 |
|
| 627 |
without compressed delta |
| 628 |
|
| 629 |
$ hg -R t1 bundle -a -t 'v2;cg.version=04' ./v2-cg-04.hg |
| 630 |
7 changesets found |
| 631 |
$ hg debugbundle ./v2-cg-04.hg --spec |
| 632 |
bzip2-v2;cg.version=04 |
| 633 |
|
| 634 |
with uncompressed delta only |
| 635 |
|
| 636 |
$ FOO=1 hg -R t1 bundle -a -t 'v2;cg.version=04;cg.delta-compression=none' ./v2-cg-04-un-comp.hg |
| 637 |
7 changesets found |
| 638 |
$ hg debugbundle ./v2-cg-04-un-comp.hg --spec |
| 639 |
bzip2-v2;cg.delta-compression=none;cg.version=04 |
| 640 |
|
| 641 |
with uncompressed and zlib delta only |
| 642 |
|
| 643 |
$ hg -R t1 bundle -a -t 'v2;cg.version=04;cg.delta-compression=none,zlib' ./v2-cg-04-un-zlib-comp.hg |
| 644 |
7 changesets found |
| 645 |
$ hg debugbundle ./v2-cg-04-un-zlib-comp.hg --spec |
| 646 |
bzip2-v2;cg.delta-compression=none,zlib;cg.version=04 |
| 647 |
|
| 648 |
|
| 649 |
with uncompressed, zlib and zstd delta |
| 650 |
|
| 651 |
$ hg -R t1 bundle -a -t 'v2;cg.version=04;cg.delta-compression=none,zlib,zstd' ./v2-cg-04-any-comp.hg |
| 652 |
7 changesets found |
| 653 |
$ hg -R t1 debugformat compression |
| 654 |
format-variant repo |
| 655 |
compression: zlib (no-zstd !) |
| 656 |
compression: zstd (zstd !) |
| 657 |
compression-level: default |
| 658 |
$ hg debugbundle ./v2-cg-04-any-comp.hg --spec |
| 659 |
bzip2-v2;cg.delta-compression=none,zlib;cg.version=04 (no-zstd !) |
| 660 |
bzip2-v2;cg.delta-compression=none,zlib,zstd;cg.version=04 (zstd !) |
| 661 |
|
| 662 |
|
| 663 |
with unknown compression |
| 664 |
|
| 665 |
$ hg -R t1 bundle -a -t 'v2;cg.version=04;cg.delta-compression=xxx,yyy' ./v2-cg-04-xx-comp.hg |
| 666 |
7 changesets found |
| 667 |
$ hg debugbundle ./v2-cg-04-xx-comp.hg --spec |
| 668 |
bzip2-v2;cg.version=04 |
| 669 |
|
| 670 |
tests controlling bundle contents |
| 671 |
================================= |
| 672 |
|
| 673 |
$ hg debugupdatecache -R t1 |
| 674 |
|
| 675 |
default content |
| 676 |
--------------- |
| 677 |
|
| 678 |
$ hg -R t1 bundle --all --quiet --type 'v2' ./v2.hg |
| 679 |
$ hg debugbundle ./v2.hg --spec |
| 680 |
bzip2-v2 |
| 681 |
$ hg debugbundle ./v2.hg --quiet |
| 682 |
Stream params: {Compression: BZ} |
| 683 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 684 |
hgtagsfnodes -- {} (mandatory: False) |
| 685 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 686 |
|
| 687 |
$ hg -R t1 bundle --all --quiet --type 'v3' ./v3.hg |
| 688 |
$ hg debugbundle ./v3.hg --spec |
| 689 |
bzip2-v2;cg.version=03 |
| 690 |
$ hg debugbundle ./v3.hg --quiet |
| 691 |
Stream params: {Compression: BZ} |
| 692 |
changegroup -- {nbchanges: 7, targetphase: 2, version: 03} (mandatory: True) |
| 693 |
hgtagsfnodes -- {} (mandatory: False) |
| 694 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 695 |
phase-heads -- {} (mandatory: True) |
| 696 |
|
| 697 |
adding extra parts |
| 698 |
------------------ |
| 699 |
|
| 700 |
We should have a "phase-heads" part here that we did not had in the default content |
| 701 |
|
| 702 |
$ hg -R t1 bundle --all --quiet --type 'v2;phases=1' ./v2-phases.hg |
| 703 |
$ hg debugbundle ./v2-phases.hg --spec |
| 704 |
bzip2-v2 |
| 705 |
$ hg debugbundle ./v2-phases.hg --quiet |
| 706 |
Stream params: {Compression: BZ} |
| 707 |
changegroup -- {nbchanges: 7, targetphase: 2, version: 02} (mandatory: True) |
| 708 |
hgtagsfnodes -- {} (mandatory: False) |
| 709 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 710 |
phase-heads -- {} (mandatory: True) |
| 711 |
|
| 712 |
skipping default inclusion |
| 713 |
-------------------------- |
| 714 |
|
| 715 |
$ hg -R t1 bundle --all --quiet --type 'v2;tagsfnodescache=false' ./v2-no-tfc.hg |
| 716 |
$ hg debugbundle ./v2-no-tfc.hg --spec |
| 717 |
bzip2-v2 |
| 718 |
$ hg debugbundle ./v2-no-tfc.hg --quiet |
| 719 |
Stream params: {Compression: BZ} |
| 720 |
changegroup -- {nbchanges: 7, version: 02} (mandatory: True) |
| 721 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 722 |
|
| 723 |
$ hg -R t1 bundle --all --quiet --type 'v3;phases=0' ./v3-no-phases.hg |
| 724 |
$ hg debugbundle ./v3-no-phases.hg --spec |
| 725 |
bzip2-v2;cg.version=03 |
| 726 |
$ hg debugbundle ./v3-no-phases.hg --quiet |
| 727 |
Stream params: {Compression: BZ} |
| 728 |
changegroup -- {nbchanges: 7, version: 03} (mandatory: True) |
| 729 |
hgtagsfnodes -- {} (mandatory: False) |
| 730 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 731 |
|
| 732 |
$ hg -R t1 bundle --all --quiet --type 'v3;phases=no;tagsfnodescache=0' ./v3-multi-no.hg |
| 733 |
$ hg debugbundle ./v3-multi-no.hg --spec |
| 734 |
bzip2-v2;cg.version=03 |
| 735 |
$ hg debugbundle ./v3-multi-no.hg --quiet |
| 736 |
Stream params: {Compression: BZ} |
| 737 |
changegroup -- {nbchanges: 7, version: 03} (mandatory: True) |
| 738 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 739 |
|
| 740 |
skipping changegroup |
| 741 |
-------------------- |
| 742 |
|
| 743 |
$ hg -R t1 bundle --all --quiet --type 'v2;changegroup=no' ./v2-no-cg.hg |
| 744 |
$ hg debugbundle ./v2-no-cg.hg --spec |
| 745 |
bzip2-v2;changegroup=no |
| 746 |
$ hg debugbundle ./v2-no-cg.hg --quiet |
| 747 |
Stream params: {Compression: BZ} |
| 748 |
hgtagsfnodes -- {} (mandatory: False) |
| 749 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 750 |
|
| 751 |
$ hg -R t1 bundle --all --quiet --type 'v3;changegroup=0' ./v3-no-cg.hg |
| 752 |
$ hg debugbundle ./v3-no-cg.hg --spec |
| 753 |
bzip2-v2;changegroup=no |
| 754 |
$ hg debugbundle ./v3-no-cg.hg --quiet |
| 755 |
Stream params: {Compression: BZ} |
| 756 |
hgtagsfnodes -- {} (mandatory: False) |
| 757 |
cache:rev-branch-cache -- {} (mandatory: False) |
| 758 |
phase-heads -- {} (mandatory: True) |