| 1 |
Setting up test |
| 2 |
|
| 3 |
$ hg init test |
| 4 |
$ cd test |
| 5 |
$ echo 0 > afile |
| 6 |
$ hg add afile |
| 7 |
$ hg commit -m "0.0" |
| 8 |
$ echo 1 >> afile |
| 9 |
$ hg commit -m "0.1" |
| 10 |
$ echo 2 >> afile |
| 11 |
$ hg commit -m "0.2" |
| 12 |
$ echo 3 >> afile |
| 13 |
$ hg commit -m "0.3" |
| 14 |
$ hg update -C 0 |
| 15 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 16 |
$ echo 1 >> afile |
| 17 |
$ hg commit -m "1.1" |
| 18 |
created new head |
| 19 |
$ echo 2 >> afile |
| 20 |
$ hg commit -m "1.2" |
| 21 |
$ echo "a line" > fred |
| 22 |
$ echo 3 >> afile |
| 23 |
$ hg add fred |
| 24 |
$ hg commit -m "1.3" |
| 25 |
$ hg mv afile adifferentfile |
| 26 |
$ hg commit -m "1.3m" |
| 27 |
$ hg update -C 3 |
| 28 |
1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
| 29 |
$ hg mv afile anotherfile |
| 30 |
$ hg commit -m "0.3m" |
| 31 |
$ hg verify -q |
| 32 |
$ cd .. |
| 33 |
$ hg init empty |
| 34 |
|
| 35 |
Bundle and phase |
| 36 |
|
| 37 |
$ hg -R test phase --force --secret 0 |
| 38 |
$ hg -R test bundle phase.hg empty |
| 39 |
searching for changes |
| 40 |
no changes found (ignored 9 secret changesets) |
| 41 |
[1] |
| 42 |
$ hg -R test phase --draft -r 'head()' |
| 43 |
|
| 44 |
Bundle --all |
| 45 |
|
| 46 |
$ hg -R test bundle --all all.hg |
| 47 |
9 changesets found |
| 48 |
|
| 49 |
Bundle test to full.hg |
| 50 |
|
| 51 |
$ hg -R test bundle full.hg empty |
| 52 |
searching for changes |
| 53 |
9 changesets found |
| 54 |
|
| 55 |
Unbundle full.hg in test |
| 56 |
|
| 57 |
$ hg -R test unbundle full.hg |
| 58 |
adding changesets |
| 59 |
adding manifests |
| 60 |
adding file changes |
| 61 |
added 0 changesets with 0 changes to 4 files |
| 62 |
(run 'hg update' to get a working copy) |
| 63 |
|
| 64 |
Verify empty |
| 65 |
|
| 66 |
$ hg -R empty heads |
| 67 |
[1] |
| 68 |
$ hg -R empty verify -q |
| 69 |
|
| 70 |
Pull full.hg into test (using --cwd) |
| 71 |
|
| 72 |
$ hg --cwd test pull ../full.hg |
| 73 |
pulling from ../full.hg |
| 74 |
searching for changes |
| 75 |
no changes found |
| 76 |
|
| 77 |
Verify that there are no leaked temporary files after pull (issue2797) |
| 78 |
|
| 79 |
$ ls test/.hg | grep .hg10un |
| 80 |
[1] |
| 81 |
|
| 82 |
Pull full.hg into empty (using --cwd) |
| 83 |
|
| 84 |
$ hg --cwd empty pull ../full.hg |
| 85 |
pulling from ../full.hg |
| 86 |
requesting all changes |
| 87 |
adding changesets |
| 88 |
adding manifests |
| 89 |
adding file changes |
| 90 |
added 9 changesets with 7 changes to 4 files (+1 heads) |
| 91 |
new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
| 92 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 93 |
|
| 94 |
Rollback empty |
| 95 |
|
| 96 |
$ hg -R empty rollback |
| 97 |
repository tip rolled back to revision -1 (undo pull) |
| 98 |
|
| 99 |
Pull full.hg into empty again (using --cwd) |
| 100 |
|
| 101 |
$ hg --cwd empty pull ../full.hg |
| 102 |
pulling from ../full.hg |
| 103 |
requesting all changes |
| 104 |
adding changesets |
| 105 |
adding manifests |
| 106 |
adding file changes |
| 107 |
added 9 changesets with 7 changes to 4 files (+1 heads) |
| 108 |
new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
| 109 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 110 |
|
| 111 |
Pull full.hg into test (using -R) |
| 112 |
|
| 113 |
$ hg -R test pull full.hg |
| 114 |
pulling from full.hg |
| 115 |
searching for changes |
| 116 |
no changes found |
| 117 |
|
| 118 |
Pull full.hg into empty (using -R) |
| 119 |
|
| 120 |
$ hg -R empty pull full.hg |
| 121 |
pulling from full.hg |
| 122 |
searching for changes |
| 123 |
no changes found |
| 124 |
|
| 125 |
Rollback empty |
| 126 |
|
| 127 |
$ hg -R empty rollback |
| 128 |
repository tip rolled back to revision -1 (undo pull) |
| 129 |
|
| 130 |
Pull full.hg into empty again (using -R) |
| 131 |
|
| 132 |
$ hg -R empty pull full.hg |
| 133 |
pulling from full.hg |
| 134 |
requesting all changes |
| 135 |
adding changesets |
| 136 |
adding manifests |
| 137 |
adding file changes |
| 138 |
added 9 changesets with 7 changes to 4 files (+1 heads) |
| 139 |
new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
| 140 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 141 |
|
| 142 |
Log -R full.hg in fresh empty |
| 143 |
|
| 144 |
$ rm -r empty |
| 145 |
$ hg init empty |
| 146 |
$ cd empty |
| 147 |
$ hg -R bundle://../full.hg log |
| 148 |
changeset: 8:aa35859c02ea |
| 149 |
tag: tip |
| 150 |
parent: 3:eebf5a27f8ca |
| 151 |
user: test |
| 152 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 153 |
summary: 0.3m |
| 154 |
|
| 155 |
changeset: 7:a6a34bfa0076 |
| 156 |
user: test |
| 157 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 158 |
summary: 1.3m |
| 159 |
|
| 160 |
changeset: 6:7373c1169842 |
| 161 |
user: test |
| 162 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 163 |
summary: 1.3 |
| 164 |
|
| 165 |
changeset: 5:1bb50a9436a7 |
| 166 |
user: test |
| 167 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 168 |
summary: 1.2 |
| 169 |
|
| 170 |
changeset: 4:095197eb4973 |
| 171 |
parent: 0:f9ee2f85a263 |
| 172 |
user: test |
| 173 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 174 |
summary: 1.1 |
| 175 |
|
| 176 |
changeset: 3:eebf5a27f8ca |
| 177 |
user: test |
| 178 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 179 |
summary: 0.3 |
| 180 |
|
| 181 |
changeset: 2:e38ba6f5b7e0 |
| 182 |
user: test |
| 183 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 184 |
summary: 0.2 |
| 185 |
|
| 186 |
changeset: 1:34c2bf6b0626 |
| 187 |
user: test |
| 188 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 189 |
summary: 0.1 |
| 190 |
|
| 191 |
changeset: 0:f9ee2f85a263 |
| 192 |
user: test |
| 193 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 194 |
summary: 0.0 |
| 195 |
|
| 196 |
Make sure bundlerepo doesn't leak tempfiles (issue2491) |
| 197 |
|
| 198 |
$ ls .hg |
| 199 |
00changelog.i |
| 200 |
cache |
| 201 |
requires |
| 202 |
store |
| 203 |
wcache |
| 204 |
|
| 205 |
Pull ../full.hg into empty (with hook) |
| 206 |
|
| 207 |
$ cat >> .hg/hgrc <<EOF |
| 208 |
> [hooks] |
| 209 |
> changegroup = sh -c "printenv.py --line changegroup" |
| 210 |
> EOF |
| 211 |
|
| 212 |
doesn't work (yet ?) |
| 213 |
NOTE: msys is mangling the URL below |
| 214 |
|
| 215 |
hg -R bundle://../full.hg verify |
| 216 |
|
| 217 |
$ hg pull bundle://../full.hg |
| 218 |
pulling from bundle:../full.hg |
| 219 |
requesting all changes |
| 220 |
adding changesets |
| 221 |
adding manifests |
| 222 |
adding file changes |
| 223 |
added 9 changesets with 7 changes to 4 files (+1 heads) |
| 224 |
new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
| 225 |
changegroup hook: HG_HOOKNAME=changegroup |
| 226 |
HG_HOOKTYPE=changegroup |
| 227 |
HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 |
| 228 |
HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf |
| 229 |
HG_SOURCE=pull |
| 230 |
HG_TXNID=TXN:$ID$ |
| 231 |
HG_TXNNAME=pull |
| 232 |
bundle:../full.hg (no-msys !) |
| 233 |
bundle;../full.hg (msys !) |
| 234 |
HG_URL=bundle:../full.hg (no-msys !) |
| 235 |
HG_URL=bundle;../full.hg (msys !) |
| 236 |
|
| 237 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 238 |
|
| 239 |
Rollback empty |
| 240 |
|
| 241 |
$ hg rollback |
| 242 |
repository tip rolled back to revision -1 (undo pull) |
| 243 |
$ cd .. |
| 244 |
|
| 245 |
Log -R bundle:empty+full.hg |
| 246 |
|
| 247 |
$ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
| 248 |
8 7 6 5 4 3 2 1 0 |
| 249 |
|
| 250 |
Pull full.hg into empty again (using -R; with hook) |
| 251 |
|
| 252 |
$ hg -R empty pull full.hg |
| 253 |
pulling from full.hg |
| 254 |
requesting all changes |
| 255 |
adding changesets |
| 256 |
adding manifests |
| 257 |
adding file changes |
| 258 |
added 9 changesets with 7 changes to 4 files (+1 heads) |
| 259 |
new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
| 260 |
changegroup hook: HG_HOOKNAME=changegroup |
| 261 |
HG_HOOKTYPE=changegroup |
| 262 |
HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 |
| 263 |
HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf |
| 264 |
HG_SOURCE=pull |
| 265 |
HG_TXNID=TXN:$ID$ |
| 266 |
HG_TXNNAME=pull |
| 267 |
bundle:empty+full.hg |
| 268 |
HG_URL=bundle:empty+full.hg |
| 269 |
|
| 270 |
(run 'hg heads' to see heads, 'hg merge' to merge) |
| 271 |
|
| 272 |
Cannot produce streaming clone bundles with "hg bundle" |
| 273 |
|
| 274 |
$ hg -R test bundle -t packed1 packed.hg |
| 275 |
abort: packed bundles cannot be produced by "hg bundle" |
| 276 |
(use 'hg debugcreatestreamclonebundle') |
| 277 |
[10] |
| 278 |
|
| 279 |
packed1 is produced properly |
| 280 |
|
| 281 |
|
| 282 |
#if rust |
| 283 |
|
| 284 |
$ hg -R test debugcreatestreamclonebundle packed.hg |
| 285 |
writing 2665 bytes for 6 files (no-rust !) |
| 286 |
writing 2919 bytes for 9 files (rust !) |
| 287 |
bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog |
| 288 |
|
| 289 |
$ f -B 64 --size --sha1 --hexdump packed.hg |
| 290 |
packed.hg: size=2865, sha1=e66b45f9d6b474d3516b42d38bb347f726ceb75f (no-rust !) |
| 291 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| (no-rust !) |
| 292 |
0010: 00 00 00 00 0a 69 00 3b 67 65 6e 65 72 61 6c 64 |.....i.;generald| (no-rust !) |
| 293 |
packed.hg: size=3181, sha1=3e865df183d388222969c5b19c844dd8697c85c6 (rust !) |
| 294 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 09 00 00 |HGS1UN..........| (rust !) |
| 295 |
0010: 00 00 00 00 0b 67 00 3b 67 65 6e 65 72 61 6c 64 |.....g.;generald| (rust !) |
| 296 |
0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 2d 63 6f 6d 70 |elta,revlog-comp| |
| 297 |
0030: 72 65 73 73 69 6f 6e 2d 7a 73 74 64 2c 72 65 76 |ression-zstd,rev| |
| 298 |
$ hg debugbundle --spec packed.hg |
| 299 |
none-packed1;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog |
| 300 |
#endif |
| 301 |
|
| 302 |
#if no-rust zstd |
| 303 |
|
| 304 |
$ hg -R test debugcreatestreamclonebundle packed.hg |
| 305 |
writing 2665 bytes for 7 files |
| 306 |
bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog |
| 307 |
|
| 308 |
$ f -B 64 --size --sha1 --hexdump packed.hg |
| 309 |
packed.hg: size=2882, sha1=e66b45f9d6b474d3516b42d38bb347f726ceb75f |
| 310 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 07 00 00 |HGS1UN..........| |
| 311 |
0010: 00 00 00 00 0a 69 00 3b 67 65 6e 65 72 61 6c 64 |.....i.;generald| |
| 312 |
0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 2d 63 6f 6d 70 |elta,revlog-comp| |
| 313 |
0030: 72 65 73 73 69 6f 6e 2d 7a 73 74 64 2c 72 65 76 |ression-zstd,rev| |
| 314 |
$ hg debugbundle --spec packed.hg |
| 315 |
none-packed1;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog |
| 316 |
#endif |
| 317 |
|
| 318 |
#if no-rust no-zstd |
| 319 |
|
| 320 |
$ hg -R test debugcreatestreamclonebundle packed.hg |
| 321 |
writing 2664 bytes for 7 files |
| 322 |
bundle requirements: generaldelta, revlogv1, sparserevlog |
| 323 |
|
| 324 |
$ f -B 64 --size --sha1 --hexdump packed.hg |
| 325 |
packed.hg: size=2857, sha1=3a7353323915b095baa6f2ee0a5aed588f11f5f0 |
| 326 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 07 00 00 |HGS1UN..........| |
| 327 |
0010: 00 00 00 00 0a 68 00 23 67 65 6e 65 72 61 6c 64 |.....h.#generald| |
| 328 |
0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| |
| 329 |
0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| |
| 330 |
$ hg debugbundle --spec packed.hg |
| 331 |
none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog |
| 332 |
#endif |
| 333 |
|
| 334 |
generaldelta requirement is not listed in stream clone bundles unless used |
| 335 |
|
| 336 |
$ hg --config format.usegeneraldelta=false init testnongd |
| 337 |
$ cd testnongd |
| 338 |
$ touch foo |
| 339 |
$ hg -q commit -A -m initial |
| 340 |
$ cd .. |
| 341 |
|
| 342 |
#if rust |
| 343 |
|
| 344 |
$ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
| 345 |
writing 301 bytes for 3 files (no-rust !) |
| 346 |
writing 427 bytes for 6 files (rust !) |
| 347 |
bundle requirements: revlog-compression-zstd, revlogv1 |
| 348 |
|
| 349 |
$ f -B 64 --size --sha1 --hexdump packednongd.hg |
| 350 |
packednongd.hg: size=407, sha1=0b8714422b785ba8eb98c916b41ffd5fb994c9b5 (no-rust !) |
| 351 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........| (no-rust !) |
| 352 |
0010: 00 00 00 00 01 2d 00 21 72 65 76 6c 6f 67 2d 63 |.....-.!revlog-c| (no-rust !) |
| 353 |
packednongd.hg: size=593, sha1=1ad0cbea11b5dd7b0437e54ae20fc5f8df118521 (rust !) |
| 354 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........| (rust !) |
| 355 |
0010: 00 00 00 00 01 ab 00 21 72 65 76 6c 6f 67 2d 63 |.......!revlog-c| (rust !) |
| 356 |
0020: 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 2c |ompression-zstd,| |
| 357 |
0030: 72 65 76 6c 6f 67 76 31 00 64 61 74 61 2f 66 6f |revlogv1.data/fo| |
| 358 |
|
| 359 |
$ hg debugbundle --spec packednongd.hg |
| 360 |
none-packed1;requirements%3Drevlog-compression-zstd%2Crevlogv1 |
| 361 |
|
| 362 |
#endif |
| 363 |
|
| 364 |
#if no-rust zstd |
| 365 |
|
| 366 |
$ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
| 367 |
writing 301 bytes for 4 files |
| 368 |
bundle requirements: revlog-compression-zstd, revlogv1 |
| 369 |
|
| 370 |
$ f -B 64 --size --sha1 --hexdump packednongd.hg |
| 371 |
packednongd.hg: size=423, sha1=4269c89cf64b6a4377be75a3983771c4153362bf |
| 372 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 04 00 00 |HGS1UN..........| |
| 373 |
0010: 00 00 00 00 01 2d 00 21 72 65 76 6c 6f 67 2d 63 |.....-.!revlog-c| |
| 374 |
0020: 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 2c |ompression-zstd,| |
| 375 |
0030: 72 65 76 6c 6f 67 76 31 00 64 61 74 61 2f 66 6f |revlogv1.data/fo| |
| 376 |
|
| 377 |
$ hg debugbundle --spec packednongd.hg |
| 378 |
none-packed1;requirements%3Drevlog-compression-zstd%2Crevlogv1 |
| 379 |
|
| 380 |
|
| 381 |
#endif |
| 382 |
|
| 383 |
#if no-rust no-zstd |
| 384 |
|
| 385 |
$ hg -R testnongd debugcreatestreamclonebundle packednongd.hg |
| 386 |
writing 301 bytes for 4 files |
| 387 |
bundle requirements: revlogv1 |
| 388 |
|
| 389 |
$ f -B 64 --size --sha1 --hexdump packednongd.hg |
| 390 |
packednongd.hg: size=399, sha1=99bb89decfc6674a3cf2cc87accc8c5332ede7fd |
| 391 |
0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 04 00 00 |HGS1UN..........| |
| 392 |
0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| |
| 393 |
0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| |
| 394 |
0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |
| 395 |
|
| 396 |
$ hg debugbundle --spec packednongd.hg |
| 397 |
none-packed1;requirements%3Drevlogv1 |
| 398 |
|
| 399 |
|
| 400 |
#endif |
| 401 |
|
| 402 |
Warning emitted when packed bundles contain secret changesets |
| 403 |
|
| 404 |
$ hg init testsecret |
| 405 |
$ cd testsecret |
| 406 |
$ touch foo |
| 407 |
$ hg -q commit -A -m initial |
| 408 |
$ hg phase --force --secret -r . |
| 409 |
$ cd .. |
| 410 |
|
| 411 |
#if rust |
| 412 |
|
| 413 |
$ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg |
| 414 |
(warning: stream clone bundle will contain secret revisions) |
| 415 |
writing 301 bytes for 3 files (no-rust !) |
| 416 |
writing 427 bytes for 6 files (rust !) |
| 417 |
bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog |
| 418 |
|
| 419 |
#endif |
| 420 |
|
| 421 |
#if no-rust zstd |
| 422 |
|
| 423 |
$ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg |
| 424 |
(warning: stream clone bundle will contain secret revisions) |
| 425 |
writing 301 bytes for 4 files |
| 426 |
bundle requirements: generaldelta, revlog-compression-zstd, revlogv1, sparserevlog |
| 427 |
|
| 428 |
#endif |
| 429 |
|
| 430 |
#if no-rust no-zstd |
| 431 |
|
| 432 |
$ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg |
| 433 |
(warning: stream clone bundle will contain secret revisions) |
| 434 |
writing 301 bytes for 4 files |
| 435 |
bundle requirements: generaldelta, revlogv1, sparserevlog |
| 436 |
|
| 437 |
#endif |
| 438 |
|
| 439 |
Unpacking packed1 bundles with "hg unbundle" isn't allowed |
| 440 |
|
| 441 |
$ hg init packed |
| 442 |
$ hg -R packed unbundle packed.hg |
| 443 |
abort: packed bundles cannot be applied with "hg unbundle" |
| 444 |
(use "hg debugapplystreamclonebundle") |
| 445 |
[10] |
| 446 |
|
| 447 |
packed1 can be consumed from debug command |
| 448 |
|
| 449 |
(this also confirms that streamclone-ed changes are visible via |
| 450 |
@filecache properties to in-process procedures before closing |
| 451 |
transaction) |
| 452 |
|
| 453 |
$ cat > $TESTTMP/showtip.py <<EOF |
| 454 |
> |
| 455 |
> def showtip(ui, repo, hooktype, **kwargs): |
| 456 |
> ui.warn(b'%s: %s\n' % (hooktype, repo[b'tip'].hex()[:12])) |
| 457 |
> |
| 458 |
> def reposetup(ui, repo): |
| 459 |
> # this confirms (and ensures) that (empty) 00changelog.i |
| 460 |
> # before streamclone is already cached as repo.changelog |
| 461 |
> ui.setconfig(b'hooks', b'pretxnopen.showtip', showtip) |
| 462 |
> |
| 463 |
> # this confirms that streamclone-ed changes are visible to |
| 464 |
> # in-process procedures before closing transaction |
| 465 |
> ui.setconfig(b'hooks', b'pretxnclose.showtip', showtip) |
| 466 |
> |
| 467 |
> # this confirms that streamclone-ed changes are still visible |
| 468 |
> # after closing transaction |
| 469 |
> ui.setconfig(b'hooks', b'txnclose.showtip', showtip) |
| 470 |
> EOF |
| 471 |
$ cat >> $HGRCPATH <<EOF |
| 472 |
> [extensions] |
| 473 |
> showtip = $TESTTMP/showtip.py |
| 474 |
> EOF |
| 475 |
|
| 476 |
$ hg -R packed debugapplystreamclonebundle packed.hg |
| 477 |
7 files to transfer, 2.60 KB of data (no-rust !) |
| 478 |
9 files to transfer, 2.85 KB of data (rust !) |
| 479 |
pretxnopen: 000000000000 |
| 480 |
pretxnclose: aa35859c02ea |
| 481 |
stream-cloned 7 files / 2.60 KB in * seconds (* */sec) (glob) (no-rust !) |
| 482 |
stream-cloned 9 files / 2.85 KB in * seconds (* */sec) (glob) (rust !) |
| 483 |
txnclose: aa35859c02ea |
| 484 |
|
| 485 |
(for safety, confirm visibility of streamclone-ed changes by another |
| 486 |
process, too) |
| 487 |
|
| 488 |
$ hg -R packed tip -T "{node|short}\n" |
| 489 |
aa35859c02ea |
| 490 |
|
| 491 |
$ cat >> $HGRCPATH <<EOF |
| 492 |
> [extensions] |
| 493 |
> showtip = ! |
| 494 |
> EOF |
| 495 |
|
| 496 |
Does not work on non-empty repo |
| 497 |
|
| 498 |
$ hg -R packed debugapplystreamclonebundle packed.hg |
| 499 |
abort: cannot apply stream clone bundle on non-empty repo |
| 500 |
[255] |
| 501 |
|
| 502 |
Create partial clones |
| 503 |
|
| 504 |
$ rm -r empty |
| 505 |
$ hg init empty |
| 506 |
$ hg clone -r 3 test partial |
| 507 |
adding changesets |
| 508 |
adding manifests |
| 509 |
adding file changes |
| 510 |
added 4 changesets with 4 changes to 1 files |
| 511 |
new changesets f9ee2f85a263:eebf5a27f8ca |
| 512 |
updating to branch default |
| 513 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 514 |
$ hg clone partial partial2 |
| 515 |
updating to branch default |
| 516 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 517 |
$ cd partial |
| 518 |
|
| 519 |
Log -R full.hg in partial |
| 520 |
|
| 521 |
$ hg -R bundle://../full.hg log -T phases |
| 522 |
changeset: 8:aa35859c02ea |
| 523 |
tag: tip |
| 524 |
phase: draft |
| 525 |
parent: 3:eebf5a27f8ca |
| 526 |
user: test |
| 527 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 528 |
summary: 0.3m |
| 529 |
|
| 530 |
changeset: 7:a6a34bfa0076 |
| 531 |
phase: draft |
| 532 |
user: test |
| 533 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 534 |
summary: 1.3m |
| 535 |
|
| 536 |
changeset: 6:7373c1169842 |
| 537 |
phase: draft |
| 538 |
user: test |
| 539 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 540 |
summary: 1.3 |
| 541 |
|
| 542 |
changeset: 5:1bb50a9436a7 |
| 543 |
phase: draft |
| 544 |
user: test |
| 545 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 546 |
summary: 1.2 |
| 547 |
|
| 548 |
changeset: 4:095197eb4973 |
| 549 |
phase: draft |
| 550 |
parent: 0:f9ee2f85a263 |
| 551 |
user: test |
| 552 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 553 |
summary: 1.1 |
| 554 |
|
| 555 |
changeset: 3:eebf5a27f8ca |
| 556 |
phase: public |
| 557 |
user: test |
| 558 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 559 |
summary: 0.3 |
| 560 |
|
| 561 |
changeset: 2:e38ba6f5b7e0 |
| 562 |
phase: public |
| 563 |
user: test |
| 564 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 565 |
summary: 0.2 |
| 566 |
|
| 567 |
changeset: 1:34c2bf6b0626 |
| 568 |
phase: public |
| 569 |
user: test |
| 570 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 571 |
summary: 0.1 |
| 572 |
|
| 573 |
changeset: 0:f9ee2f85a263 |
| 574 |
phase: public |
| 575 |
user: test |
| 576 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 577 |
summary: 0.0 |
| 578 |
|
| 579 |
|
| 580 |
Incoming full.hg in partial |
| 581 |
|
| 582 |
$ hg incoming bundle://../full.hg |
| 583 |
comparing with bundle:../full.hg |
| 584 |
searching for changes |
| 585 |
changeset: 4:095197eb4973 |
| 586 |
parent: 0:f9ee2f85a263 |
| 587 |
user: test |
| 588 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 589 |
summary: 1.1 |
| 590 |
|
| 591 |
changeset: 5:1bb50a9436a7 |
| 592 |
user: test |
| 593 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 594 |
summary: 1.2 |
| 595 |
|
| 596 |
changeset: 6:7373c1169842 |
| 597 |
user: test |
| 598 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 599 |
summary: 1.3 |
| 600 |
|
| 601 |
changeset: 7:a6a34bfa0076 |
| 602 |
user: test |
| 603 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 604 |
summary: 1.3m |
| 605 |
|
| 606 |
changeset: 8:aa35859c02ea |
| 607 |
tag: tip |
| 608 |
parent: 3:eebf5a27f8ca |
| 609 |
user: test |
| 610 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 611 |
summary: 0.3m |
| 612 |
|
| 613 |
|
| 614 |
Outgoing -R full.hg vs partial2 in partial |
| 615 |
|
| 616 |
$ hg -R bundle://../full.hg outgoing ../partial2 |
| 617 |
comparing with ../partial2 |
| 618 |
searching for changes |
| 619 |
changeset: 4:095197eb4973 |
| 620 |
parent: 0:f9ee2f85a263 |
| 621 |
user: test |
| 622 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 623 |
summary: 1.1 |
| 624 |
|
| 625 |
changeset: 5:1bb50a9436a7 |
| 626 |
user: test |
| 627 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 628 |
summary: 1.2 |
| 629 |
|
| 630 |
changeset: 6:7373c1169842 |
| 631 |
user: test |
| 632 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 633 |
summary: 1.3 |
| 634 |
|
| 635 |
changeset: 7:a6a34bfa0076 |
| 636 |
user: test |
| 637 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 638 |
summary: 1.3m |
| 639 |
|
| 640 |
changeset: 8:aa35859c02ea |
| 641 |
tag: tip |
| 642 |
parent: 3:eebf5a27f8ca |
| 643 |
user: test |
| 644 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 645 |
summary: 0.3m |
| 646 |
|
| 647 |
|
| 648 |
Outgoing -R does-not-exist.hg vs partial2 in partial |
| 649 |
|
| 650 |
$ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
| 651 |
abort: *../does-not-exist.hg* (glob) |
| 652 |
[255] |
| 653 |
|
| 654 |
$ cd .. |
| 655 |
|
| 656 |
hide outer repo |
| 657 |
$ hg init |
| 658 |
|
| 659 |
Direct clone from bundle (all-history) |
| 660 |
|
| 661 |
$ hg clone full.hg full-clone |
| 662 |
requesting all changes |
| 663 |
adding changesets |
| 664 |
adding manifests |
| 665 |
adding file changes |
| 666 |
added 9 changesets with 7 changes to 4 files (+1 heads) |
| 667 |
new changesets f9ee2f85a263:aa35859c02ea (9 drafts) |
| 668 |
updating to branch default |
| 669 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 670 |
$ hg -R full-clone heads |
| 671 |
changeset: 8:aa35859c02ea |
| 672 |
tag: tip |
| 673 |
parent: 3:eebf5a27f8ca |
| 674 |
user: test |
| 675 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 676 |
summary: 0.3m |
| 677 |
|
| 678 |
changeset: 7:a6a34bfa0076 |
| 679 |
user: test |
| 680 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 681 |
summary: 1.3m |
| 682 |
|
| 683 |
$ rm -r full-clone |
| 684 |
|
| 685 |
When cloning from a non-copiable repository into '', do not |
| 686 |
recurse infinitely (issue2528) |
| 687 |
|
| 688 |
$ hg clone full.hg '' |
| 689 |
abort: empty destination path is not valid |
| 690 |
[10] |
| 691 |
|
| 692 |
test for https://bz.mercurial-scm.org/216 |
| 693 |
|
| 694 |
Unbundle incremental bundles into fresh empty in one go |
| 695 |
|
| 696 |
$ rm -r empty |
| 697 |
$ hg init empty |
| 698 |
$ hg -R test bundle --base null -r 0 ../0.hg |
| 699 |
1 changesets found |
| 700 |
$ hg -R test bundle --exact -r 1 ../1.hg |
| 701 |
1 changesets found |
| 702 |
$ hg -R empty unbundle -u ../0.hg ../1.hg |
| 703 |
adding changesets |
| 704 |
adding manifests |
| 705 |
adding file changes |
| 706 |
added 1 changesets with 1 changes to 1 files |
| 707 |
new changesets f9ee2f85a263 (1 drafts) |
| 708 |
adding changesets |
| 709 |
adding manifests |
| 710 |
adding file changes |
| 711 |
added 1 changesets with 1 changes to 1 files |
| 712 |
new changesets 34c2bf6b0626 (1 drafts) |
| 713 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 714 |
|
| 715 |
View full contents of the bundle |
| 716 |
$ hg -R test bundle --base null -r 3 ../partial.hg |
| 717 |
4 changesets found |
| 718 |
$ cd test |
| 719 |
$ hg -R ../../partial.hg log -r "bundle()" |
| 720 |
changeset: 0:f9ee2f85a263 |
| 721 |
user: test |
| 722 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 723 |
summary: 0.0 |
| 724 |
|
| 725 |
changeset: 1:34c2bf6b0626 |
| 726 |
user: test |
| 727 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 728 |
summary: 0.1 |
| 729 |
|
| 730 |
changeset: 2:e38ba6f5b7e0 |
| 731 |
user: test |
| 732 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 733 |
summary: 0.2 |
| 734 |
|
| 735 |
changeset: 3:eebf5a27f8ca |
| 736 |
user: test |
| 737 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 738 |
summary: 0.3 |
| 739 |
|
| 740 |
$ cd .. |
| 741 |
|
| 742 |
test for 540d1059c802 |
| 743 |
|
| 744 |
$ hg init orig |
| 745 |
$ cd orig |
| 746 |
$ echo foo > foo |
| 747 |
$ hg add foo |
| 748 |
$ hg ci -m 'add foo' |
| 749 |
|
| 750 |
$ hg clone . ../copy |
| 751 |
updating to branch default |
| 752 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 753 |
$ hg tag foo |
| 754 |
|
| 755 |
$ cd ../copy |
| 756 |
$ echo >> foo |
| 757 |
$ hg ci -m 'change foo' |
| 758 |
$ hg bundle ../bundle.hg ../orig |
| 759 |
searching for changes |
| 760 |
1 changesets found |
| 761 |
|
| 762 |
$ cd .. |
| 763 |
|
| 764 |
$ cd orig |
| 765 |
$ hg incoming ../bundle.hg |
| 766 |
comparing with ../bundle.hg |
| 767 |
searching for changes |
| 768 |
changeset: 2:ed1b79f46b9a |
| 769 |
tag: tip |
| 770 |
parent: 0:bbd179dfa0a7 |
| 771 |
user: test |
| 772 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 773 |
summary: change foo |
| 774 |
|
| 775 |
$ cd .. |
| 776 |
|
| 777 |
test bundle with # in the filename (issue2154): |
| 778 |
|
| 779 |
$ cp bundle.hg 'test#bundle.hg' |
| 780 |
$ cd orig |
| 781 |
$ hg incoming '../test#bundle.hg' |
| 782 |
comparing with ../test |
| 783 |
abort: unknown revision 'bundle.hg' |
| 784 |
[10] |
| 785 |
|
| 786 |
note that percent encoding is not handled: |
| 787 |
|
| 788 |
$ hg incoming ../test%23bundle.hg |
| 789 |
abort: repository ../test%23bundle.hg not found |
| 790 |
[255] |
| 791 |
$ cd .. |
| 792 |
|
| 793 |
test to bundle revisions on the newly created branch (issue3828): |
| 794 |
|
| 795 |
$ hg -q clone -U test test-clone |
| 796 |
$ cd test |
| 797 |
|
| 798 |
$ hg -q branch foo |
| 799 |
$ hg commit -m "create foo branch" |
| 800 |
$ hg -q outgoing ../test-clone |
| 801 |
9:b4f5acb1ee27 |
| 802 |
$ hg -q bundle --branch foo foo.hg ../test-clone |
| 803 |
$ hg -R foo.hg -q log -r "bundle()" |
| 804 |
9:b4f5acb1ee27 |
| 805 |
|
| 806 |
$ cd .. |
| 807 |
|
| 808 |
test for https://bz.mercurial-scm.org/1144 |
| 809 |
|
| 810 |
test that verify bundle does not traceback |
| 811 |
|
| 812 |
partial history bundle, fails w/ unknown parent |
| 813 |
|
| 814 |
$ hg -R bundle.hg verify |
| 815 |
abort: 00changelog@bbd179dfa0a71671c253b3ae0aa1513b60d199fa: unknown parent |
| 816 |
[50] |
| 817 |
|
| 818 |
full history bundle, refuses to verify non-local repo |
| 819 |
|
| 820 |
$ hg -R all.hg verify |
| 821 |
abort: cannot verify bundle or remote repos |
| 822 |
[255] |
| 823 |
|
| 824 |
but, regular verify must continue to work |
| 825 |
|
| 826 |
$ hg -R orig verify -q |
| 827 |
|
| 828 |
diff against bundle |
| 829 |
|
| 830 |
$ hg init b |
| 831 |
$ cd b |
| 832 |
$ hg -R ../all.hg diff -r tip |
| 833 |
diff -r aa35859c02ea anotherfile |
| 834 |
--- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 |
| 835 |
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 836 |
@@ -1,4 +0,0 @@ |
| 837 |
-0 |
| 838 |
-1 |
| 839 |
-2 |
| 840 |
-3 |
| 841 |
$ cd .. |
| 842 |
|
| 843 |
bundle single branch |
| 844 |
|
| 845 |
$ hg init branchy |
| 846 |
$ cd branchy |
| 847 |
$ echo a >a |
| 848 |
$ echo x >x |
| 849 |
$ hg ci -Ama |
| 850 |
adding a |
| 851 |
adding x |
| 852 |
$ echo c >c |
| 853 |
$ echo xx >x |
| 854 |
$ hg ci -Amc |
| 855 |
adding c |
| 856 |
$ echo c1 >c1 |
| 857 |
$ hg ci -Amc1 |
| 858 |
adding c1 |
| 859 |
$ hg up 0 |
| 860 |
1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
| 861 |
$ echo b >b |
| 862 |
$ hg ci -Amb |
| 863 |
adding b |
| 864 |
created new head |
| 865 |
$ echo b1 >b1 |
| 866 |
$ echo xx >x |
| 867 |
$ hg ci -Amb1 |
| 868 |
adding b1 |
| 869 |
$ hg clone -q -r2 . part |
| 870 |
|
| 871 |
== bundling via incoming |
| 872 |
|
| 873 |
$ hg in -R part --bundle incoming.hg --template "{node}\n" . |
| 874 |
comparing with . |
| 875 |
searching for changes |
| 876 |
1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
| 877 |
057f4db07f61970e1c11e83be79e9d08adc4dc31 |
| 878 |
|
| 879 |
== bundling |
| 880 |
|
| 881 |
$ hg bundle bundle.hg part --debug --config progress.debug=true |
| 882 |
query 1; heads |
| 883 |
searching for changes |
| 884 |
all remote heads known locally |
| 885 |
2 changesets found |
| 886 |
list of changesets: |
| 887 |
1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
| 888 |
057f4db07f61970e1c11e83be79e9d08adc4dc31 |
| 889 |
bundle2-output-bundle: "HG20", (1 params) 2 parts total |
| 890 |
bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
| 891 |
changesets: 1/2 chunks (50.00%) |
| 892 |
changesets: 2/2 chunks (100.00%) |
| 893 |
manifests: 1/2 chunks (50.00%) |
| 894 |
manifests: 2/2 chunks (100.00%) |
| 895 |
files: b 1/3 files (33.33%) |
| 896 |
files: b1 2/3 files (66.67%) |
| 897 |
files: x 3/3 files (100.00%) |
| 898 |
bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload |
| 899 |
|
| 900 |
== Test for issue3441 |
| 901 |
|
| 902 |
$ hg clone -q -r0 . part2 |
| 903 |
$ hg -q -R part2 pull bundle.hg |
| 904 |
$ hg -R part2 verify -q |
| 905 |
|
| 906 |
== Test bundling no commits |
| 907 |
|
| 908 |
$ hg bundle -r 'public()' no-output.hg |
| 909 |
abort: no commits to bundle |
| 910 |
[10] |
| 911 |
|
| 912 |
$ cd .. |
| 913 |
|
| 914 |
When user merges to the revision existing only in the bundle, |
| 915 |
it should show warning that second parent of the working |
| 916 |
directory does not exist |
| 917 |
|
| 918 |
$ hg init update2bundled |
| 919 |
$ cd update2bundled |
| 920 |
$ cat <<EOF >> .hg/hgrc |
| 921 |
> [extensions] |
| 922 |
> strip = |
| 923 |
> EOF |
| 924 |
$ echo "aaa" >> a |
| 925 |
$ hg commit -A -m 0 |
| 926 |
adding a |
| 927 |
$ echo "bbb" >> b |
| 928 |
$ hg commit -A -m 1 |
| 929 |
adding b |
| 930 |
$ echo "ccc" >> c |
| 931 |
$ hg commit -A -m 2 |
| 932 |
adding c |
| 933 |
$ hg update -r 1 |
| 934 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 935 |
$ echo "ddd" >> d |
| 936 |
$ hg commit -A -m 3 |
| 937 |
adding d |
| 938 |
created new head |
| 939 |
$ hg update -r 2 |
| 940 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 941 |
$ hg log -G |
| 942 |
o changeset: 3:8bd3e1f196af |
| 943 |
| tag: tip |
| 944 |
| parent: 1:a01eca7af26d |
| 945 |
| user: test |
| 946 |
| date: Thu Jan 01 00:00:00 1970 +0000 |
| 947 |
| summary: 3 |
| 948 |
| |
| 949 |
| @ changeset: 2:4652c276ac4f |
| 950 |
|/ user: test |
| 951 |
| date: Thu Jan 01 00:00:00 1970 +0000 |
| 952 |
| summary: 2 |
| 953 |
| |
| 954 |
o changeset: 1:a01eca7af26d |
| 955 |
| user: test |
| 956 |
| date: Thu Jan 01 00:00:00 1970 +0000 |
| 957 |
| summary: 1 |
| 958 |
| |
| 959 |
o changeset: 0:4fe08cd4693e |
| 960 |
user: test |
| 961 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 962 |
summary: 0 |
| 963 |
|
| 964 |
$ hg bundle --base 1 -r 3 ../update2bundled.hg |
| 965 |
1 changesets found |
| 966 |
$ hg strip -r 3 |
| 967 |
saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg |
| 968 |
$ hg merge -R ../update2bundled.hg -r 3 |
| 969 |
setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
| 970 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 971 |
(branch merge, don't forget to commit) |
| 972 |
|
| 973 |
When user updates to the revision existing only in the bundle, |
| 974 |
it should show warning |
| 975 |
|
| 976 |
$ hg update -R ../update2bundled.hg --clean -r 3 |
| 977 |
setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle |
| 978 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 979 |
|
| 980 |
When user updates to the revision existing in the local repository |
| 981 |
the warning shouldn't be emitted |
| 982 |
|
| 983 |
$ hg update -R ../update2bundled.hg -r 0 |
| 984 |
0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
| 985 |
|
| 986 |
Test the option that create slim bundle |
| 987 |
|
| 988 |
$ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg |
| 989 |
3 changesets found |
| 990 |
|
| 991 |
Test the option that create and no-delta's bundle |
| 992 |
$ hg bundle -a --config devel.bundle.delta=full ./full.hg |
| 993 |
3 changesets found |
| 994 |
|
| 995 |
|
| 996 |
Test the debug statistic when building a bundle |
| 997 |
----------------------------------------------- |
| 998 |
|
| 999 |
$ hg bundle -a ./default.hg --config debug.bundling-stats=yes |
| 1000 |
3 changesets found |
| 1001 |
DEBUG-BUNDLING: revisions: 9 |
| 1002 |
DEBUG-BUNDLING: changelog: 3 |
| 1003 |
DEBUG-BUNDLING: manifest: 3 |
| 1004 |
DEBUG-BUNDLING: files: 3 (for 3 revlogs) |
| 1005 |
DEBUG-BUNDLING: deltas: |
| 1006 |
DEBUG-BUNDLING: from-storage: 2 (100% of available 2) |
| 1007 |
DEBUG-BUNDLING: computed: 7 |
| 1008 |
DEBUG-BUNDLING: full: 7 (100% of native 7) |
| 1009 |
DEBUG-BUNDLING: changelog: 3 (100% of native 3) |
| 1010 |
DEBUG-BUNDLING: manifests: 1 (100% of native 1) |
| 1011 |
DEBUG-BUNDLING: files: 3 (100% of native 3) |
| 1012 |
|
| 1013 |
Test the debug output when applying delta |
| 1014 |
----------------------------------------- |
| 1015 |
|
| 1016 |
$ hg init foo |
| 1017 |
$ hg -R foo unbundle ./slim.hg \ |
| 1018 |
> --config debug.revlog.debug-delta=yes \ |
| 1019 |
> --config storage.revlog.reuse-external-delta=no \ |
| 1020 |
> --config storage.revlog.reuse-external-delta-parent=no |
| 1021 |
adding changesets |
| 1022 |
DBG-DELTAS: CHANGELOG: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) |
| 1023 |
DBG-DELTAS: CHANGELOG: rev=1: delta-base=1 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) |
| 1024 |
DBG-DELTAS: CHANGELOG: rev=2: delta-base=2 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) |
| 1025 |
adding manifests |
| 1026 |
DBG-DELTAS: MANIFESTLOG: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) |
| 1027 |
DBG-DELTAS: MANIFESTLOG: rev=1: delta-base=0 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=-1 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) |
| 1028 |
DBG-DELTAS: MANIFESTLOG: rev=2: delta-base=1 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=-1 - p1-chain-length=1 p2-chain-length=-1 - duration=* (glob) |
| 1029 |
adding file changes |
| 1030 |
DBG-DELTAS: FILELOG:a: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) |
| 1031 |
DBG-DELTAS: FILELOG:b: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) |
| 1032 |
DBG-DELTAS: FILELOG:c: rev=0: delta-base=0 is-cached=1 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) |
| 1033 |
added 3 changesets with 3 changes to 3 files |
| 1034 |
new changesets 4fe08cd4693e:4652c276ac4f (3 drafts) |
| 1035 |
(run 'hg update' to get a working copy) |
| 1036 |
|
| 1037 |
|
| 1038 |
Test the debug statistic when applying a bundle |
| 1039 |
----------------------------------------------- |
| 1040 |
|
| 1041 |
$ hg init bar |
| 1042 |
$ hg -R bar unbundle ./default.hg --config debug.unbundling-stats=yes |
| 1043 |
adding changesets |
| 1044 |
adding manifests |
| 1045 |
adding file changes |
| 1046 |
DEBUG-UNBUNDLING: revisions: 9 |
| 1047 |
DEBUG-UNBUNDLING: changelog: 3 ( 33%) |
| 1048 |
DEBUG-UNBUNDLING: manifests: 3 ( 33%) |
| 1049 |
DEBUG-UNBUNDLING: files: 3 ( 33%) |
| 1050 |
DEBUG-UNBUNDLING: total-time: ?????????????? seconds (glob) |
| 1051 |
DEBUG-UNBUNDLING: changelog: ?????????????? seconds (???%) (glob) |
| 1052 |
DEBUG-UNBUNDLING: manifests: ?????????????? seconds (???%) (glob) |
| 1053 |
DEBUG-UNBUNDLING: files: ?????????????? seconds (???%) (glob) |
| 1054 |
DEBUG-UNBUNDLING: type-count: |
| 1055 |
DEBUG-UNBUNDLING: changelog: |
| 1056 |
DEBUG-UNBUNDLING: full: 3 |
| 1057 |
DEBUG-UNBUNDLING: cached: 3 (100%) |
| 1058 |
DEBUG-UNBUNDLING: manifests: |
| 1059 |
DEBUG-UNBUNDLING: full: 1 |
| 1060 |
DEBUG-UNBUNDLING: cached: 1 (100%) |
| 1061 |
DEBUG-UNBUNDLING: delta: 2 |
| 1062 |
DEBUG-UNBUNDLING: cached: 2 (100%) |
| 1063 |
DEBUG-UNBUNDLING: files: |
| 1064 |
DEBUG-UNBUNDLING: full: 3 |
| 1065 |
DEBUG-UNBUNDLING: cached: 3 (100%) |
| 1066 |
DEBUG-UNBUNDLING: type-time: |
| 1067 |
DEBUG-UNBUNDLING: changelog: |
| 1068 |
DEBUG-UNBUNDLING: full: ?????????????? seconds (???% of total) (glob) |
| 1069 |
DEBUG-UNBUNDLING: cached: ?????????????? seconds (???% of total) (glob) |
| 1070 |
DEBUG-UNBUNDLING: manifests: |
| 1071 |
DEBUG-UNBUNDLING: full: ?????????????? seconds (???% of total) (glob) |
| 1072 |
DEBUG-UNBUNDLING: cached: ?????????????? seconds (???% of total) (glob) |
| 1073 |
DEBUG-UNBUNDLING: delta: ?????????????? seconds (???% of total) (glob) |
| 1074 |
DEBUG-UNBUNDLING: cached: ?????????????? seconds (???% of total) (glob) |
| 1075 |
DEBUG-UNBUNDLING: files: |
| 1076 |
DEBUG-UNBUNDLING: full: ?????????????? seconds (???% of total) (glob) |
| 1077 |
DEBUG-UNBUNDLING: cached: ?????????????? seconds (???% of total) (glob) |
| 1078 |
added 3 changesets with 3 changes to 3 files |
| 1079 |
new changesets 4fe08cd4693e:4652c276ac4f (3 drafts) |
| 1080 |
(run 'hg update' to get a working copy) |