559 #endif |
559 #endif |
560 |
560 |
561 recovery from invalid cache revs file with trailing data |
561 recovery from invalid cache revs file with trailing data |
562 $ echo >> .hg/cache/rbc-revs-v1 |
562 $ echo >> .hg/cache/rbc-revs-v1 |
563 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
563 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
|
564 5 |
564 truncating cache/rbc-revs-v1 to 120 |
565 truncating cache/rbc-revs-v1 to 120 |
565 5 |
|
566 $ f --size .hg/cache/rbc-revs* |
566 $ f --size .hg/cache/rbc-revs* |
567 .hg/cache/rbc-revs-v1: size=120 |
567 .hg/cache/rbc-revs-v1: size=120 |
568 recovery from invalid cache file with partial last record |
568 recovery from invalid cache file with partial last record |
569 $ mv .hg/cache/rbc-revs-v1 . |
569 $ mv .hg/cache/rbc-revs-v1 . |
570 $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
570 $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
571 $ f --size .hg/cache/rbc-revs* |
571 $ f --size .hg/cache/rbc-revs* |
572 .hg/cache/rbc-revs-v1: size=119 |
572 .hg/cache/rbc-revs-v1: size=119 |
573 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
573 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
|
574 5 |
574 truncating cache/rbc-revs-v1 to 112 |
575 truncating cache/rbc-revs-v1 to 112 |
575 5 |
|
576 $ f --size .hg/cache/rbc-revs* |
576 $ f --size .hg/cache/rbc-revs* |
577 .hg/cache/rbc-revs-v1: size=120 |
577 .hg/cache/rbc-revs-v1: size=120 |
578 recovery from invalid cache file with missing record - no truncation |
578 recovery from invalid cache file with missing record - no truncation |
579 $ mv .hg/cache/rbc-revs-v1 . |
579 $ mv .hg/cache/rbc-revs-v1 . |
580 $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
580 $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
588 $ f --size .hg/cache/rbc-revs* |
588 $ f --size .hg/cache/rbc-revs* |
589 .hg/cache/rbc-revs-v1: size=8 |
589 .hg/cache/rbc-revs-v1: size=8 |
590 $ f -qDB 112 rbc-revs-v1 >> .hg/cache/rbc-revs-v1 |
590 $ f -qDB 112 rbc-revs-v1 >> .hg/cache/rbc-revs-v1 |
591 $ f --size .hg/cache/rbc-revs* |
591 $ f --size .hg/cache/rbc-revs* |
592 .hg/cache/rbc-revs-v1: size=120 |
592 .hg/cache/rbc-revs-v1: size=120 |
593 $ hg log -r 'branch(.)' -T '{rev} ' |
593 $ hg log -r 'branch(.)' -T '{rev} ' --debug |
594 3 4 8 9 10 11 12 13 (no-eol) |
594 3 4 8 9 10 11 12 13 truncating cache/rbc-revs-v1 to 8 |
595 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
595 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
596 truncating cache/rbc-revs-v1 to 8 |
|
597 5 |
596 5 |
|
597 truncating cache/rbc-revs-v1 to 104 |
598 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs* |
598 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs* |
599 .hg/cache/rbc-revs-v1: size=120 |
599 .hg/cache/rbc-revs-v1: size=120 |
600 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| |
600 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| |
601 cache is updated when committing |
601 cache is updated when committing |
602 $ hg branch i-will-regret-this |
602 $ hg branch i-will-regret-this |