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