##// END OF EJS Templates
upgrade: fix handling of `.d` data file...
marmoute -
r43271:675a925b default
parent child Browse files
Show More
@@ -385,9 +385,22 b' Upgrading a repository to generaldelta w'
385 $ touch FooBarDirectory.d/f1
385 $ touch FooBarDirectory.d/f1
386 $ hg -q commit -A -m 'add f1'
386 $ hg -q commit -A -m 'add f1'
387 $ hg -q up -r 0
387 $ hg -q up -r 0
388 $ touch f2
388 >>> from __future__ import absolute_import, print_function
389 >>> import random
390 >>> random.seed(0) # have a reproducible content
391 >>> with open("f2", "w") as f:
392 ... for i in range(100000):
393 ... f.write("%d\n" % random.randint(1000000000, 9999999999))
389 $ hg -q commit -A -m 'add f2'
394 $ hg -q commit -A -m 'add f2'
390
395
396 make sure we have a .d file
397
398 $ ls -d .hg/store/data/*
399 .hg/store/data/_foo_bar_directory.d.hg
400 .hg/store/data/f0.i
401 .hg/store/data/f2.d
402 .hg/store/data/f2.i
403
391 $ hg debugupgraderepo --run --config format.sparse-revlog=false
404 $ hg debugupgraderepo --run --config format.sparse-revlog=false
392 upgrade will perform the following actions:
405 upgrade will perform the following actions:
393
406
@@ -403,14 +416,14 b' Upgrading a repository to generaldelta w'
403 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
416 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
404 (it is safe to interrupt this process any time before data migration completes)
417 (it is safe to interrupt this process any time before data migration completes)
405 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
418 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
406 migrating 953 bytes in store; 437 bytes tracked data
419 migrating 519 KB in store; 1.05 MB tracked data
407 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
420 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
408 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
421 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
409 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
422 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
410 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
423 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
411 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
424 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
412 finished migrating 3 changelog revisions; change in size: 0 bytes
425 finished migrating 3 changelog revisions; change in size: 0 bytes
413 finished migrating 9 total revisions; total change in store size: 0 bytes
426 finished migrating 9 total revisions; total change in store size: -17 bytes
414 copying phaseroots
427 copying phaseroots
415 data fully migrated to temporary repository
428 data fully migrated to temporary repository
416 marking source repository as being upgraded; clients will be unable to read from repository
429 marking source repository as being upgraded; clients will be unable to read from repository
@@ -499,8 +512,8 b' unless --no-backup is passed'
499 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
512 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
500 (it is safe to interrupt this process any time before data migration completes)
513 (it is safe to interrupt this process any time before data migration completes)
501 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
514 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
502 migrating 953 bytes in store; 437 bytes tracked data
515 migrating 519 KB in store; 1.05 MB tracked data
503 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
516 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
504 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
517 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
505 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
518 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
506 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
519 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
@@ -536,8 +549,8 b' We can restrict optimization to some rev'
536 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
549 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
537 (it is safe to interrupt this process any time before data migration completes)
550 (it is safe to interrupt this process any time before data migration completes)
538 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
551 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
539 migrating 953 bytes in store; 437 bytes tracked data
552 migrating 519 KB in store; 1.05 MB tracked data
540 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
553 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
541 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
554 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
542 blindly copying data/f0.i containing 1 revisions
555 blindly copying data/f0.i containing 1 revisions
543 blindly copying data/f2.i containing 1 revisions
556 blindly copying data/f2.i containing 1 revisions
@@ -562,14 +575,16 b' We can restrict optimization to some rev'
562
575
563 Check that the repo still works fine
576 Check that the repo still works fine
564
577
565 $ hg log -G --patch
578 $ hg log -G --stat
566 @ changeset: 2:b5a3b78015e5
579 @ changeset: 2:76d4395f5413
567 | tag: tip
580 | tag: tip
568 | parent: 0:ba592bf28da2
581 | parent: 0:ba592bf28da2
569 | user: test
582 | user: test
570 | date: Thu Jan 01 00:00:00 1970 +0000
583 | date: Thu Jan 01 00:00:00 1970 +0000
571 | summary: add f2
584 | summary: add f2
572 |
585 |
586 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
587 | 1 files changed, 100000 insertions(+), 0 deletions(-)
573 |
588 |
574 | o changeset: 1:2029ce2354e2
589 | o changeset: 1:2029ce2354e2
575 |/ user: test
590 |/ user: test
@@ -589,7 +604,10 b' Check that the repo still works fine'
589 checking manifests
604 checking manifests
590 crosschecking files in changesets and manifests
605 crosschecking files in changesets and manifests
591 checking files
606 checking files
607 warning: revlog 'data/f2.d' not in fncache!
592 checked 3 changesets with 3 changes to 3 files
608 checked 3 changesets with 3 changes to 3 files
609 1 warnings encountered!
610 hint: run "hg debugrebuildfncache" to recover from corrupt fncache
593
611
594 Check we can select negatively
612 Check we can select negatively
595
613
@@ -607,8 +625,8 b' Check we can select negatively'
607 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
625 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
608 (it is safe to interrupt this process any time before data migration completes)
626 (it is safe to interrupt this process any time before data migration completes)
609 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
627 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
610 migrating 953 bytes in store; 437 bytes tracked data
628 migrating 519 KB in store; 1.05 MB tracked data
611 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
629 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
612 cloning 1 revisions from data/FooBarDirectory.d/f1.i
630 cloning 1 revisions from data/FooBarDirectory.d/f1.i
613 cloning 1 revisions from data/f0.i
631 cloning 1 revisions from data/f0.i
614 cloning 1 revisions from data/f2.i
632 cloning 1 revisions from data/f2.i
@@ -653,8 +671,8 b' Check that we can select changelog only'
653 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
671 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
654 (it is safe to interrupt this process any time before data migration completes)
672 (it is safe to interrupt this process any time before data migration completes)
655 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
673 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
656 migrating 953 bytes in store; 437 bytes tracked data
674 migrating 519 KB in store; 1.05 MB tracked data
657 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
675 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
658 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
676 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
659 blindly copying data/f0.i containing 1 revisions
677 blindly copying data/f0.i containing 1 revisions
660 blindly copying data/f2.i containing 1 revisions
678 blindly copying data/f2.i containing 1 revisions
@@ -681,7 +699,10 b' Check that we can select changelog only'
681 checking manifests
699 checking manifests
682 crosschecking files in changesets and manifests
700 crosschecking files in changesets and manifests
683 checking files
701 checking files
702 warning: revlog 'data/f2.d' not in fncache!
684 checked 3 changesets with 3 changes to 3 files
703 checked 3 changesets with 3 changes to 3 files
704 1 warnings encountered!
705 hint: run "hg debugrebuildfncache" to recover from corrupt fncache
685
706
686 Check that we can select filelog only
707 Check that we can select filelog only
687
708
@@ -699,8 +720,8 b' Check that we can select filelog only'
699 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
720 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
700 (it is safe to interrupt this process any time before data migration completes)
721 (it is safe to interrupt this process any time before data migration completes)
701 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
722 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
702 migrating 953 bytes in store; 437 bytes tracked data
723 migrating 519 KB in store; 1.05 MB tracked data
703 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
724 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
704 cloning 1 revisions from data/FooBarDirectory.d/f1.i
725 cloning 1 revisions from data/FooBarDirectory.d/f1.i
705 cloning 1 revisions from data/f0.i
726 cloning 1 revisions from data/f0.i
706 cloning 1 revisions from data/f2.i
727 cloning 1 revisions from data/f2.i
@@ -750,8 +771,8 b" Check you can't skip revlog clone during"
750 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
771 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
751 (it is safe to interrupt this process any time before data migration completes)
772 (it is safe to interrupt this process any time before data migration completes)
752 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
773 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
753 migrating 953 bytes in store; 437 bytes tracked data
774 migrating 519 KB in store; 1.05 MB tracked data
754 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
775 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
755 cloning 1 revisions from data/FooBarDirectory.d/f1.i
776 cloning 1 revisions from data/FooBarDirectory.d/f1.i
756 cloning 1 revisions from data/f0.i
777 cloning 1 revisions from data/f0.i
757 cloning 1 revisions from data/f2.i
778 cloning 1 revisions from data/f2.i
@@ -802,8 +823,8 b" Check you can't skip revlog clone during"
802 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
823 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
803 (it is safe to interrupt this process any time before data migration completes)
824 (it is safe to interrupt this process any time before data migration completes)
804 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
825 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
805 migrating 953 bytes in store; 437 bytes tracked data
826 migrating 519 KB in store; 1.05 MB tracked data
806 migrating 3 filelogs containing 3 revisions (192 bytes in store; 0 bytes tracked data)
827 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
807 cloning 1 revisions from data/FooBarDirectory.d/f1.i
828 cloning 1 revisions from data/FooBarDirectory.d/f1.i
808 cloning 1 revisions from data/f0.i
829 cloning 1 revisions from data/f0.i
809 cloning 1 revisions from data/f2.i
830 cloning 1 revisions from data/f2.i
General Comments 0
You need to be logged in to leave comments. Login now