comparison tests/test-branches.t @ 29614:5c79bae8166f stable

rbc: test case for incorrect and too aggressive invalidation of invalid caches
author Mads Kiilerich <madski@unity3d.com>
date Mon, 18 Jul 2016 22:23:44 +0200
parents db0095c83344
children a2a380e2750f
comparison
equal deleted inserted replaced
29613:616cbcb59e05 29614:5c79bae8166f
666 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 666 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
667 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 667 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
668 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 668 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
669 669
670 $ cd .. 670 $ cd ..
671
672 Test for multiple incorrect branch cache entries:
673
674 $ hg init b
675 $ cd b
676 $ touch f
677 $ hg ci -Aqmf
678 $ echo >> f
679 $ hg ci -Amf
680 $ hg branch -q branch
681 $ hg ci -Amf
682
683 $ f --size --hexdump .hg/cache/rbc-*
684 .hg/cache/rbc-names-v1: size=14
685 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
686 .hg/cache/rbc-revs-v1: size=24
687 0000: 66 e5 f5 aa 00 00 00 00 fa 4c 04 e5 00 00 00 00 |f........L......|
688 0010: 56 46 78 69 00 00 00 01 |VFxi....|
689 $ : > .hg/cache/rbc-revs-v1
690
691 $ hg log -r "branch(null)&branch(branch)" --debug
692 rebuilding corrupted revision branch cache
693 rebuilding corrupted revision branch cache
694 truncating cache/rbc-revs-v1 to 8
695 BUG: the cache was declared corrupt multiple times and not fully rebuilt:
696 $ f --size --hexdump .hg/cache/rbc-*
697 .hg/cache/rbc-names-v1: size=14
698 0000: 64 65 66 61 75 6c 74 00 62 72 61 6e 63 68 |default.branch|
699 .hg/cache/rbc-revs-v1: size=24
700 0000: 00 00 00 00 00 00 00 00 fa 4c 04 e5 00 00 00 00 |.........L......|
701 0010: 56 46 78 69 00 00 00 01 |VFxi....|
702
703 $ cd ..