##// END OF EJS Templates
test: preemptively disable sparse-revlog for some of test-upgrade-repo...
Boris Feld -
r40953:e8cd688b default
parent child Browse files
Show More
@@ -1,757 +1,757
1 1 #require no-reposimplestore
2 2
3 3 $ cat >> $HGRCPATH << EOF
4 4 > [extensions]
5 5 > share =
6 6 > EOF
7 7
8 8 store and revlogv1 are required in source
9 9
10 10 $ hg --config format.usestore=false init no-store
11 11 $ hg -R no-store debugupgraderepo
12 12 abort: cannot upgrade repository; requirement missing: store
13 13 [255]
14 14
15 15 $ hg init no-revlogv1
16 16 $ cat > no-revlogv1/.hg/requires << EOF
17 17 > dotencode
18 18 > fncache
19 19 > generaldelta
20 20 > store
21 21 > EOF
22 22
23 23 $ hg -R no-revlogv1 debugupgraderepo
24 24 abort: cannot upgrade repository; requirement missing: revlogv1
25 25 [255]
26 26
27 27 Cannot upgrade shared repositories
28 28
29 29 $ hg init share-parent
30 30 $ hg -q share share-parent share-child
31 31
32 32 $ hg -R share-child debugupgraderepo
33 33 abort: cannot upgrade repository; unsupported source requirement: shared
34 34 [255]
35 35
36 36 Do not yet support upgrading treemanifest repos
37 37
38 38 $ hg --config experimental.treemanifest=true init treemanifest
39 39 $ hg -R treemanifest debugupgraderepo
40 40 abort: cannot upgrade repository; unsupported source requirement: treemanifest
41 41 [255]
42 42
43 43 Cannot add treemanifest requirement during upgrade
44 44
45 45 $ hg init disallowaddedreq
46 46 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
47 47 abort: cannot upgrade repository; do not support adding requirement: treemanifest
48 48 [255]
49 49
50 50 An upgrade of a repository created with recommended settings only suggests optimizations
51 51
52 52 $ hg init empty
53 53 $ cd empty
54 54 $ hg debugformat
55 55 format-variant repo
56 56 fncache: yes
57 57 dotencode: yes
58 58 generaldelta: yes
59 59 sparserevlog: no
60 60 plain-cl-delta: yes
61 61 compression: zlib
62 62 $ hg debugformat --verbose
63 63 format-variant repo config default
64 64 fncache: yes yes yes
65 65 dotencode: yes yes yes
66 66 generaldelta: yes yes yes
67 67 sparserevlog: no no no
68 68 plain-cl-delta: yes yes yes
69 69 compression: zlib zlib zlib
70 70 $ hg debugformat --verbose --config format.usefncache=no
71 71 format-variant repo config default
72 72 fncache: yes no yes
73 73 dotencode: yes no yes
74 74 generaldelta: yes yes yes
75 75 sparserevlog: no no no
76 76 plain-cl-delta: yes yes yes
77 77 compression: zlib zlib zlib
78 78 $ hg debugformat --verbose --config format.usefncache=no --color=debug
79 79 format-variant repo config default
80 80 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
81 81 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
82 82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
83 83 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
84 84 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
85 85 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
86 86 $ hg debugformat -Tjson
87 87 [
88 88 {
89 89 "config": true,
90 90 "default": true,
91 91 "name": "fncache",
92 92 "repo": true
93 93 },
94 94 {
95 95 "config": true,
96 96 "default": true,
97 97 "name": "dotencode",
98 98 "repo": true
99 99 },
100 100 {
101 101 "config": true,
102 102 "default": true,
103 103 "name": "generaldelta",
104 104 "repo": true
105 105 },
106 106 {
107 107 "config": false,
108 108 "default": false,
109 109 "name": "sparserevlog",
110 110 "repo": false
111 111 },
112 112 {
113 113 "config": true,
114 114 "default": true,
115 115 "name": "plain-cl-delta",
116 116 "repo": true
117 117 },
118 118 {
119 119 "config": "zlib",
120 120 "default": "zlib",
121 121 "name": "compression",
122 122 "repo": "zlib"
123 123 }
124 124 ]
125 125 $ hg debugupgraderepo
126 126 (no feature deficiencies found in existing repository)
127 127 performing an upgrade with "--run" will make the following changes:
128 128
129 129 requirements
130 130 preserved: dotencode, fncache, generaldelta, revlogv1, store
131 131
132 132 additional optimizations are available by specifying "--optimize <name>":
133 133
134 134 redeltaparent
135 135 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
136 136
137 137 redeltamultibase
138 138 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
139 139
140 140 redeltaall
141 141 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
142 142
143 143 redeltafulladd
144 144 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.
145 145
146 146
147 147 --optimize can be used to add optimizations
148 148
149 149 $ hg debugupgrade --optimize redeltaparent
150 150 (no feature deficiencies found in existing repository)
151 151 performing an upgrade with "--run" will make the following changes:
152 152
153 153 requirements
154 154 preserved: dotencode, fncache, generaldelta, revlogv1, store
155 155
156 156 redeltaparent
157 157 deltas within internal storage will choose a new base revision if needed
158 158
159 159 additional optimizations are available by specifying "--optimize <name>":
160 160
161 161 redeltamultibase
162 162 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
163 163
164 164 redeltaall
165 165 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
166 166
167 167 redeltafulladd
168 168 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.
169 169
170 170
171 171 Various sub-optimal detections work
172 172
173 173 $ cat > .hg/requires << EOF
174 174 > revlogv1
175 175 > store
176 176 > EOF
177 177
178 178 $ hg debugformat
179 179 format-variant repo
180 180 fncache: no
181 181 dotencode: no
182 182 generaldelta: no
183 183 sparserevlog: no
184 184 plain-cl-delta: yes
185 185 compression: zlib
186 186 $ hg debugformat --verbose
187 187 format-variant repo config default
188 188 fncache: no yes yes
189 189 dotencode: no yes yes
190 190 generaldelta: no yes yes
191 191 sparserevlog: no no no
192 192 plain-cl-delta: yes yes yes
193 193 compression: zlib zlib zlib
194 194 $ hg debugformat --verbose --config format.usegeneraldelta=no
195 195 format-variant repo config default
196 196 fncache: no yes yes
197 197 dotencode: no yes yes
198 198 generaldelta: no no yes
199 199 sparserevlog: no no no
200 200 plain-cl-delta: yes yes yes
201 201 compression: zlib zlib zlib
202 202 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
203 203 format-variant repo config default
204 204 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
205 205 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
206 206 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
207 207 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
208 208 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
209 209 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
210 210 $ hg debugupgraderepo
211 211 repository lacks features recommended by current config options:
212 212
213 213 fncache
214 214 long and reserved filenames may not work correctly; repository performance is sub-optimal
215 215
216 216 dotencode
217 217 storage of filenames beginning with a period or space may not work correctly
218 218
219 219 generaldelta
220 220 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
221 221
222 222
223 223 performing an upgrade with "--run" will make the following changes:
224 224
225 225 requirements
226 226 preserved: revlogv1, store
227 227 added: dotencode, fncache, generaldelta
228 228
229 229 fncache
230 230 repository will be more resilient to storing certain paths and performance of certain operations should be improved
231 231
232 232 dotencode
233 233 repository will be better able to store files beginning with a space or period
234 234
235 235 generaldelta
236 236 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
237 237
238 238 additional optimizations are available by specifying "--optimize <name>":
239 239
240 240 redeltaparent
241 241 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
242 242
243 243 redeltamultibase
244 244 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
245 245
246 246 redeltaall
247 247 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
248 248
249 249 redeltafulladd
250 250 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.
251 251
252 252
253 253 $ hg --config format.dotencode=false debugupgraderepo
254 254 repository lacks features recommended by current config options:
255 255
256 256 fncache
257 257 long and reserved filenames may not work correctly; repository performance is sub-optimal
258 258
259 259 generaldelta
260 260 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
261 261
262 262 repository lacks features used by the default config options:
263 263
264 264 dotencode
265 265 storage of filenames beginning with a period or space may not work correctly
266 266
267 267
268 268 performing an upgrade with "--run" will make the following changes:
269 269
270 270 requirements
271 271 preserved: revlogv1, store
272 272 added: fncache, generaldelta
273 273
274 274 fncache
275 275 repository will be more resilient to storing certain paths and performance of certain operations should be improved
276 276
277 277 generaldelta
278 278 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
279 279
280 280 additional optimizations are available by specifying "--optimize <name>":
281 281
282 282 redeltaparent
283 283 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
284 284
285 285 redeltamultibase
286 286 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
287 287
288 288 redeltaall
289 289 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
290 290
291 291 redeltafulladd
292 292 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.
293 293
294 294
295 295 $ cd ..
296 296
297 297 Upgrading a repository that is already modern essentially no-ops
298 298
299 299 $ hg init modern
300 300 $ hg -R modern debugupgraderepo --run
301 301 upgrade will perform the following actions:
302 302
303 303 requirements
304 304 preserved: dotencode, fncache, generaldelta, revlogv1, store
305 305
306 306 beginning upgrade...
307 307 repository locked and read-only
308 308 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
309 309 (it is safe to interrupt this process any time before data migration completes)
310 310 data fully migrated to temporary repository
311 311 marking source repository as being upgraded; clients will be unable to read from repository
312 312 starting in-place swap of repository data
313 313 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
314 314 replacing store...
315 315 store replacement complete; repository was inconsistent for *s (glob)
316 316 finalizing requirements file and making repository readable again
317 317 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
318 318 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
319 319 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
320 320
321 321 Upgrading a repository to generaldelta works
322 322
323 323 $ hg --config format.usegeneraldelta=false init upgradegd
324 324 $ cd upgradegd
325 325 $ touch f0
326 326 $ hg -q commit -A -m initial
327 327 $ touch f1
328 328 $ hg -q commit -A -m 'add f1'
329 329 $ hg -q up -r 0
330 330 $ touch f2
331 331 $ hg -q commit -A -m 'add f2'
332 332
333 $ hg debugupgraderepo --run
333 $ hg debugupgraderepo --run --config format.sparse-revlog=false
334 334 upgrade will perform the following actions:
335 335
336 336 requirements
337 337 preserved: dotencode, fncache, revlogv1, store
338 338 added: generaldelta
339 339
340 340 generaldelta
341 341 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
342 342
343 343 beginning upgrade...
344 344 repository locked and read-only
345 345 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
346 346 (it is safe to interrupt this process any time before data migration completes)
347 347 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
348 348 migrating 917 bytes in store; 401 bytes tracked data
349 349 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
350 350 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
351 351 migrating 1 manifests containing 3 revisions (349 bytes in store; 220 bytes tracked data)
352 352 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
353 353 migrating changelog containing 3 revisions (376 bytes in store; 181 bytes tracked data)
354 354 finished migrating 3 changelog revisions; change in size: 0 bytes
355 355 finished migrating 9 total revisions; total change in store size: 0 bytes
356 356 copying phaseroots
357 357 data fully migrated to temporary repository
358 358 marking source repository as being upgraded; clients will be unable to read from repository
359 359 starting in-place swap of repository data
360 360 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
361 361 replacing store...
362 362 store replacement complete; repository was inconsistent for *s (glob)
363 363 finalizing requirements file and making repository readable again
364 364 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
365 365 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
366 366 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
367 367
368 368 Original requirements backed up
369 369
370 370 $ cat .hg/upgradebackup.*/requires
371 371 dotencode
372 372 fncache
373 373 revlogv1
374 374 store
375 375
376 376 generaldelta added to original requirements files
377 377
378 378 $ cat .hg/requires
379 379 dotencode
380 380 fncache
381 381 generaldelta
382 382 revlogv1
383 383 store
384 384
385 385 store directory has files we expect
386 386
387 387 $ ls .hg/store
388 388 00changelog.i
389 389 00manifest.i
390 390 data
391 391 fncache
392 392 phaseroots
393 393 undo
394 394 undo.backupfiles
395 395 undo.phaseroots
396 396
397 397 manifest should be generaldelta
398 398
399 399 $ hg debugrevlog -m | grep flags
400 400 flags : inline, generaldelta
401 401
402 402 verify should be happy
403 403
404 404 $ hg verify
405 405 checking changesets
406 406 checking manifests
407 407 crosschecking files in changesets and manifests
408 408 checking files
409 409 checked 3 changesets with 3 changes to 3 files
410 410
411 411 old store should be backed up
412 412
413 413 $ ls .hg/upgradebackup.*/store
414 414 00changelog.i
415 415 00manifest.i
416 416 data
417 417 fncache
418 418 phaseroots
419 419 undo
420 420 undo.backup.fncache
421 421 undo.backupfiles
422 422 undo.phaseroots
423 423
424 424 $ cd ..
425 425
426 426 store files with special filenames aren't encoded during copy
427 427
428 428 $ hg init store-filenames
429 429 $ cd store-filenames
430 430 $ touch foo
431 431 $ hg -q commit -A -m initial
432 432 $ touch .hg/store/.XX_special_filename
433 433
434 434 $ hg debugupgraderepo --run
435 435 upgrade will perform the following actions:
436 436
437 437 requirements
438 438 preserved: dotencode, fncache, generaldelta, revlogv1, store
439 439
440 440 beginning upgrade...
441 441 repository locked and read-only
442 442 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
443 443 (it is safe to interrupt this process any time before data migration completes)
444 444 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
445 445 migrating 301 bytes in store; 107 bytes tracked data
446 446 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
447 447 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
448 448 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
449 449 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
450 450 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
451 451 finished migrating 1 changelog revisions; change in size: 0 bytes
452 452 finished migrating 3 total revisions; total change in store size: 0 bytes
453 453 copying .XX_special_filename
454 454 copying phaseroots
455 455 data fully migrated to temporary repository
456 456 marking source repository as being upgraded; clients will be unable to read from repository
457 457 starting in-place swap of repository data
458 458 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
459 459 replacing store...
460 460 store replacement complete; repository was inconsistent for *s (glob)
461 461 finalizing requirements file and making repository readable again
462 462 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
463 463 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
464 464 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
465 465 $ hg debugupgraderepo --run --optimize redeltafulladd
466 466 upgrade will perform the following actions:
467 467
468 468 requirements
469 469 preserved: dotencode, fncache, generaldelta, revlogv1, store
470 470
471 471 redeltafulladd
472 472 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
473 473
474 474 beginning upgrade...
475 475 repository locked and read-only
476 476 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
477 477 (it is safe to interrupt this process any time before data migration completes)
478 478 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
479 479 migrating 301 bytes in store; 107 bytes tracked data
480 480 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
481 481 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
482 482 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
483 483 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
484 484 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
485 485 finished migrating 1 changelog revisions; change in size: 0 bytes
486 486 finished migrating 3 total revisions; total change in store size: 0 bytes
487 487 copying .XX_special_filename
488 488 copying phaseroots
489 489 data fully migrated to temporary repository
490 490 marking source repository as being upgraded; clients will be unable to read from repository
491 491 starting in-place swap of repository data
492 492 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
493 493 replacing store...
494 494 store replacement complete; repository was inconsistent for *s (glob)
495 495 finalizing requirements file and making repository readable again
496 496 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
497 497 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
498 498 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
499 499
500 500 fncache is valid after upgrade
501 501
502 502 $ hg debugrebuildfncache
503 503 fncache already up to date
504 504
505 505 $ cd ..
506 506
507 507 Check upgrading a large file repository
508 508 ---------------------------------------
509 509
510 510 $ hg init largefilesrepo
511 511 $ cat << EOF >> largefilesrepo/.hg/hgrc
512 512 > [extensions]
513 513 > largefiles =
514 514 > EOF
515 515
516 516 $ cd largefilesrepo
517 517 $ touch foo
518 518 $ hg add --large foo
519 519 $ hg -q commit -m initial
520 520 $ cat .hg/requires
521 521 dotencode
522 522 fncache
523 523 generaldelta
524 524 largefiles
525 525 revlogv1
526 526 store
527 527
528 528 $ hg debugupgraderepo --run
529 529 upgrade will perform the following actions:
530 530
531 531 requirements
532 532 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
533 533
534 534 beginning upgrade...
535 535 repository locked and read-only
536 536 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
537 537 (it is safe to interrupt this process any time before data migration completes)
538 538 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
539 539 migrating 355 bytes in store; 160 bytes tracked data
540 540 migrating 1 filelogs containing 1 revisions (106 bytes in store; 41 bytes tracked data)
541 541 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
542 542 migrating 1 manifests containing 1 revisions (116 bytes in store; 51 bytes tracked data)
543 543 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
544 544 migrating changelog containing 1 revisions (133 bytes in store; 68 bytes tracked data)
545 545 finished migrating 1 changelog revisions; change in size: 0 bytes
546 546 finished migrating 3 total revisions; total change in store size: 0 bytes
547 547 copying phaseroots
548 548 data fully migrated to temporary repository
549 549 marking source repository as being upgraded; clients will be unable to read from repository
550 550 starting in-place swap of repository data
551 551 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
552 552 replacing store...
553 553 store replacement complete; repository was inconsistent for *s (glob)
554 554 finalizing requirements file and making repository readable again
555 555 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
556 556 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
557 557 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
558 558 $ cat .hg/requires
559 559 dotencode
560 560 fncache
561 561 generaldelta
562 562 largefiles
563 563 revlogv1
564 564 store
565 565
566 566 $ cat << EOF >> .hg/hgrc
567 567 > [extensions]
568 568 > lfs =
569 569 > [lfs]
570 570 > threshold = 10
571 571 > EOF
572 572 $ echo '123456789012345' > lfs.bin
573 573 $ hg ci -Am 'lfs.bin'
574 574 adding lfs.bin
575 575 $ grep lfs .hg/requires
576 576 lfs
577 577 $ find .hg/store/lfs -type f
578 578 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
579 579
580 580 $ hg debugupgraderepo --run
581 581 upgrade will perform the following actions:
582 582
583 583 requirements
584 584 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store
585 585
586 586 beginning upgrade...
587 587 repository locked and read-only
588 588 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
589 589 (it is safe to interrupt this process any time before data migration completes)
590 590 migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog)
591 591 migrating 801 bytes in store; 467 bytes tracked data
592 592 migrating 2 filelogs containing 2 revisions (296 bytes in store; 182 bytes tracked data)
593 593 finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes
594 594 migrating 1 manifests containing 2 revisions (241 bytes in store; 151 bytes tracked data)
595 595 finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes
596 596 migrating changelog containing 2 revisions (264 bytes in store; 134 bytes tracked data)
597 597 finished migrating 2 changelog revisions; change in size: 0 bytes
598 598 finished migrating 6 total revisions; total change in store size: 0 bytes
599 599 copying phaseroots
600 600 copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
601 601 data fully migrated to temporary repository
602 602 marking source repository as being upgraded; clients will be unable to read from repository
603 603 starting in-place swap of repository data
604 604 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
605 605 replacing store...
606 606 store replacement complete; repository was inconsistent for *s (glob)
607 607 finalizing requirements file and making repository readable again
608 608 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
609 609 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
610 610 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
611 611
612 612 $ grep lfs .hg/requires
613 613 lfs
614 614 $ find .hg/store/lfs -type f
615 615 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
616 616 $ hg verify
617 617 checking changesets
618 618 checking manifests
619 619 crosschecking files in changesets and manifests
620 620 checking files
621 621 checked 2 changesets with 2 changes to 2 files
622 622 $ hg debugdata lfs.bin 0
623 623 version https://git-lfs.github.com/spec/v1
624 624 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
625 625 size 16
626 626 x-is-binary 0
627 627
628 628 $ cd ..
629 629
630 630 repository config is taken in account
631 631 -------------------------------------
632 632
633 633 $ cat << EOF >> $HGRCPATH
634 634 > [format]
635 635 > maxchainlen = 1
636 636 > EOF
637 637
638 638 $ hg init localconfig
639 639 $ cd localconfig
640 640 $ cat << EOF > file
641 641 > some content
642 642 > with some length
643 643 > to make sure we get a delta
644 644 > after changes
645 645 > very long
646 646 > very long
647 647 > very long
648 648 > very long
649 649 > very long
650 650 > very long
651 651 > very long
652 652 > very long
653 653 > very long
654 654 > very long
655 655 > very long
656 656 > EOF
657 657 $ hg -q commit -A -m A
658 658 $ echo "new line" >> file
659 659 $ hg -q commit -m B
660 660 $ echo "new line" >> file
661 661 $ hg -q commit -m C
662 662
663 663 $ cat << EOF >> .hg/hgrc
664 664 > [format]
665 665 > maxchainlen = 9001
666 666 > EOF
667 667 $ hg config format
668 668 format.maxchainlen=9001
669 669 $ hg debugdeltachain file
670 670 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
671 671 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000
672 672 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000
673 673 2 2 1 -1 base 84 200 84 0.42000 84 0 0.00000
674 674
675 675 $ hg debugupgraderepo --run --optimize redeltaall
676 676 upgrade will perform the following actions:
677 677
678 678 requirements
679 679 preserved: dotencode, fncache, generaldelta, revlogv1, store
680 680
681 681 redeltaall
682 682 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
683 683
684 684 beginning upgrade...
685 685 repository locked and read-only
686 686 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
687 687 (it is safe to interrupt this process any time before data migration completes)
688 688 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
689 689 migrating 1.05 KB in store; 882 bytes tracked data
690 690 migrating 1 filelogs containing 3 revisions (374 bytes in store; 573 bytes tracked data)
691 691 finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes
692 692 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
693 693 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
694 694 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
695 695 finished migrating 3 changelog revisions; change in size: 0 bytes
696 696 finished migrating 9 total revisions; total change in store size: -63 bytes
697 697 copying phaseroots
698 698 data fully migrated to temporary repository
699 699 marking source repository as being upgraded; clients will be unable to read from repository
700 700 starting in-place swap of repository data
701 701 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
702 702 replacing store...
703 703 store replacement complete; repository was inconsistent for *s (glob)
704 704 finalizing requirements file and making repository readable again
705 705 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
706 706 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
707 707 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
708 708 $ hg debugdeltachain file
709 709 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
710 710 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000
711 711 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000
712 712 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000
713 713 $ cd ..
714 714
715 715 $ cat << EOF >> $HGRCPATH
716 716 > [format]
717 717 > maxchainlen = 9001
718 718 > EOF
719 719
720 720 Check upgrading a sparse-revlog repository
721 721 ---------------------------------------
722 722
723 $ hg init sparserevlogrepo
723 $ hg init sparserevlogrepo --config format.sparse-revlog=no
724 724 $ cd sparserevlogrepo
725 725 $ touch foo
726 726 $ hg add foo
727 727 $ hg -q commit -m "foo"
728 728 $ cat .hg/requires
729 729 dotencode
730 730 fncache
731 731 generaldelta
732 732 revlogv1
733 733 store
734 734
735 735 Check that we can add the sparse-revlog format requirement
736 736 $ hg --config format.sparse-revlog=yes debugupgraderepo --run >/dev/null
737 737 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
738 738 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
739 739 $ cat .hg/requires
740 740 dotencode
741 741 fncache
742 742 generaldelta
743 743 revlogv1
744 744 sparserevlog
745 745 store
746 746
747 747 Check that we can remove the sparse-revlog format requirement
748 748 $ hg --config format.sparse-revlog=no debugupgraderepo --run >/dev/null
749 749 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
750 750 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
751 751 $ cat .hg/requires
752 752 dotencode
753 753 fncache
754 754 generaldelta
755 755 revlogv1
756 756 store
757 757 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now