##// 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
@@ -514,6 +514,70 b' Check upgrading a large file repository'
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
General Comments 0
You need to be logged in to leave comments. Login now