Mercurial > hg
comparison tests/test-branches.t @ 51518:c7e81615b5c4
branchcache: add some blank line in a test
This helps each section to stand out.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 27 Feb 2024 15:33:21 +0100 |
parents | 0239ebdd0740 |
children | fe8347b984f3 |
comparison
equal
deleted
inserted
replaced
51515:16d93adddce7 | 51518:c7e81615b5c4 |
---|---|
823 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug | 823 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
824 5 | 824 5 |
825 truncating cache/rbc-revs-v1 to 160 | 825 truncating cache/rbc-revs-v1 to 160 |
826 $ f --size .hg/cache/rbc-revs* | 826 $ f --size .hg/cache/rbc-revs* |
827 .hg/cache/rbc-revs-v1: size=160 | 827 .hg/cache/rbc-revs-v1: size=160 |
828 | |
828 recovery from invalid cache file with partial last record | 829 recovery from invalid cache file with partial last record |
829 $ mv .hg/cache/rbc-revs-v1 . | 830 $ mv .hg/cache/rbc-revs-v1 . |
830 $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1 | 831 $ f -qDB 119 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
831 $ f --size .hg/cache/rbc-revs* | 832 $ f --size .hg/cache/rbc-revs* |
832 .hg/cache/rbc-revs-v1: size=119 | 833 .hg/cache/rbc-revs-v1: size=119 |
833 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug | 834 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
834 5 | 835 5 |
835 truncating cache/rbc-revs-v1 to 112 | 836 truncating cache/rbc-revs-v1 to 112 |
836 $ f --size .hg/cache/rbc-revs* | 837 $ f --size .hg/cache/rbc-revs* |
837 .hg/cache/rbc-revs-v1: size=160 | 838 .hg/cache/rbc-revs-v1: size=160 |
839 | |
838 recovery from invalid cache file with missing record - no truncation | 840 recovery from invalid cache file with missing record - no truncation |
839 $ mv .hg/cache/rbc-revs-v1 . | 841 $ mv .hg/cache/rbc-revs-v1 . |
840 $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1 | 842 $ f -qDB 112 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
841 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug | 843 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug |
842 5 | 844 5 |
843 $ f --size .hg/cache/rbc-revs* | 845 $ f --size .hg/cache/rbc-revs* |
844 .hg/cache/rbc-revs-v1: size=160 | 846 .hg/cache/rbc-revs-v1: size=160 |
847 | |
845 recovery from invalid cache file with some bad records | 848 recovery from invalid cache file with some bad records |
846 $ mv .hg/cache/rbc-revs-v1 . | 849 $ mv .hg/cache/rbc-revs-v1 . |
847 $ f -qDB 8 rbc-revs-v1 > .hg/cache/rbc-revs-v1 | 850 $ f -qDB 8 rbc-revs-v1 > .hg/cache/rbc-revs-v1 |
848 $ f --size .hg/cache/rbc-revs* | 851 $ f --size .hg/cache/rbc-revs* |
849 .hg/cache/rbc-revs-v1: size=8 | 852 .hg/cache/rbc-revs-v1: size=8 |
858 5 | 861 5 |
859 truncating cache/rbc-revs-v1 to 104 | 862 truncating cache/rbc-revs-v1 to 104 |
860 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs* | 863 $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs* |
861 .hg/cache/rbc-revs-v1: size=160 | 864 .hg/cache/rbc-revs-v1: size=160 |
862 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| | 865 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| |
866 | |
863 cache is updated when committing | 867 cache is updated when committing |
864 $ hg branch i-will-regret-this | 868 $ hg branch i-will-regret-this |
865 marked working directory as branch i-will-regret-this | 869 marked working directory as branch i-will-regret-this |
866 $ hg ci -m regrets | 870 $ hg ci -m regrets |
867 $ f --size .hg/cache/rbc-* | 871 $ f --size .hg/cache/rbc-* |
868 .hg/cache/rbc-names-v1: size=111 | 872 .hg/cache/rbc-names-v1: size=111 |
869 .hg/cache/rbc-revs-v1: size=168 | 873 .hg/cache/rbc-revs-v1: size=168 |
874 | |
870 update after rollback - the cache will be correct but rbc-names will will still | 875 update after rollback - the cache will be correct but rbc-names will will still |
871 contain the branch name even though it no longer is used | 876 contain the branch name even though it no longer is used |
872 $ hg up -qr '.^' | 877 $ hg up -qr '.^' |
873 $ hg rollback -qf | 878 $ hg rollback -qf |
874 $ f --size --hexdump .hg/cache/rbc-* | 879 $ f --size --hexdump .hg/cache/rbc-* |
889 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....| | 894 0050: bf be 84 1b 00 00 00 02 d3 f1 63 45 80 00 00 02 |..........cE....| |
890 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....| | 895 0060: e3 d4 9c 05 80 00 00 02 e2 3b 55 05 00 00 00 02 |.........;U.....| |
891 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....| | 896 0070: f8 94 c2 56 80 00 00 03 f3 44 76 37 00 00 00 05 |...V.....Dv7....| |
892 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....| | 897 0080: a5 8c a5 d3 00 00 00 05 df 34 3b 0d 00 00 00 05 |.........4;.....| |
893 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......| | 898 0090: c9 14 c9 9f 00 00 00 06 cd 21 a8 0b 80 00 00 05 |.........!......| |
899 | |
894 cache is updated/truncated when stripping - it is thus very hard to get in a | 900 cache is updated/truncated when stripping - it is thus very hard to get in a |
895 situation where the cache is out of sync and the hash check detects it | 901 situation where the cache is out of sync and the hash check detects it |
896 $ hg --config extensions.strip= strip -r tip --nob | 902 $ hg --config extensions.strip= strip -r tip --nob |
897 $ f --size .hg/cache/rbc-revs* | 903 $ f --size .hg/cache/rbc-revs* |
898 .hg/cache/rbc-revs-v1: size=152 | 904 .hg/cache/rbc-revs-v1: size=152 |