818 |
818 |
819 No race condition |
819 No race condition |
820 |
820 |
821 $ hg clone -U --stream --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/test-repo stream-clone --debug | egrep '00(changelog|manifest)' |
821 $ hg clone -U --stream --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/test-repo stream-clone --debug | egrep '00(changelog|manifest)' |
822 adding [s] 00manifest.n (70 bytes) |
822 adding [s] 00manifest.n (70 bytes) |
|
823 adding [s] 00manifest-*.nd (118 KB) (glob) |
|
824 adding [s] 00changelog.n (70 bytes) |
|
825 adding [s] 00changelog-*.nd (118 KB) (glob) |
823 adding [s] 00manifest.d (452 KB) (no-zstd !) |
826 adding [s] 00manifest.d (452 KB) (no-zstd !) |
824 adding [s] 00manifest.d (491 KB) (zstd !) |
827 adding [s] 00manifest.d (491 KB) (zstd !) |
825 adding [s] 00manifest-*.nd (118 KB) (glob) |
|
826 adding [s] 00changelog.n (70 bytes) |
|
827 adding [s] 00changelog.d (360 KB) (no-zstd !) |
828 adding [s] 00changelog.d (360 KB) (no-zstd !) |
828 adding [s] 00changelog.d (368 KB) (zstd !) |
829 adding [s] 00changelog.d (368 KB) (zstd !) |
829 adding [s] 00changelog-*.nd (118 KB) (glob) |
|
830 adding [s] 00manifest.i (313 KB) |
830 adding [s] 00manifest.i (313 KB) |
831 adding [s] 00changelog.i (313 KB) |
831 adding [s] 00changelog.i (313 KB) |
832 $ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
832 $ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
833 00changelog-*.nd (glob) |
833 00changelog-*.nd (glob) |
834 00changelog.n |
834 00changelog.n |
887 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
887 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
888 $ hg -R test-repo/ commit -m foo |
888 $ hg -R test-repo/ commit -m foo |
889 $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
889 $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
890 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
890 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
891 $ cat clone-output |
891 $ cat clone-output |
892 remote: abort: unexpected error: [Errno 2] $ENOENT$: *'$TESTTMP/test-repo/.hg/store/00manifest-*.nd' (glob) (known-bad-output no-rust no-pure !) |
|
893 abort: pull failed on remote (known-bad-output no-rust no-pure !) |
|
894 adding [s] 00manifest.n (70 bytes) |
892 adding [s] 00manifest.n (70 bytes) |
|
893 adding [s] 00manifest-*.nd (118 KB) (glob) |
|
894 adding [s] 00changelog.n (70 bytes) |
|
895 adding [s] 00changelog-*.nd (118 KB) (glob) |
|
896 adding [s] 00manifest.d (452 KB) (no-zstd !) |
895 adding [s] 00manifest.d (491 KB) (zstd !) |
897 adding [s] 00manifest.d (491 KB) (zstd !) |
896 adding [s] 00manifest.d (452 KB) (no-zstd !) |
|
897 remote: abort: $ENOENT$: '$TESTTMP/test-repo/.hg/store/00manifest-*.nd' (glob) (known-bad-output no-rust no-pure !) |
|
898 adding [s] 00manifest-*.nd (118 KB) (glob) (rust !) |
|
899 adding [s] 00changelog.n (70 bytes) (rust !) |
|
900 adding [s] 00changelog.d (368 KB) (zstd rust !) |
|
901 adding [s] 00changelog-*.nd (118 KB) (glob) (rust !) |
|
902 adding [s] 00manifest.i (313 KB) (rust !) |
|
903 adding [s] 00changelog.i (313 KB) (rust !) |
|
904 adding [s] 00manifest-*.nd (118 KB) (glob) (pure !) |
|
905 adding [s] 00changelog.n (70 bytes) (pure !) |
|
906 adding [s] 00changelog.d (360 KB) (no-zstd !) |
898 adding [s] 00changelog.d (360 KB) (no-zstd !) |
907 adding [s] 00changelog-*.nd (118 KB) (glob) (pure !) |
899 adding [s] 00changelog.d (368 KB) (zstd !) |
908 adding [s] 00manifest.i (313 KB) (pure !) |
900 adding [s] 00manifest.i (313 KB) |
909 adding [s] 00changelog.i (313 KB) (pure !) |
901 adding [s] 00changelog.i (313 KB) |
910 |
902 |
911 Check the result state |
903 Check the result state |
912 |
904 |
913 $ f --size stream-clone-race-1/.hg/store/00changelog* |
905 $ f --size stream-clone-race-1/.hg/store/00changelog* |
914 stream-clone-race-1/.hg/store/00changelog*: file not found (known-bad-output no-rust no-pure !) |
906 stream-clone-race-1/.hg/store/00changelog-*.nd: size=121088 (glob) |
915 stream-clone-race-1/.hg/store/00changelog-*.nd: size=121088 (glob) (rust !) |
907 stream-clone-race-1/.hg/store/00changelog.d: size=368890 (no-zstd !) |
916 stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd rust !) |
908 stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd !) |
917 stream-clone-race-1/.hg/store/00changelog.i: size=320384 (rust !) |
909 stream-clone-race-1/.hg/store/00changelog.i: size=320384 |
918 stream-clone-race-1/.hg/store/00changelog.n: size=70 (rust !) |
910 stream-clone-race-1/.hg/store/00changelog.n: size=70 |
919 stream-clone-race-1/.hg/store/00changelog-*.nd: size=121088 (glob) (pure !) |
|
920 stream-clone-race-1/.hg/store/00changelog.d: size=368890 (no-zstd pure !) |
|
921 stream-clone-race-1/.hg/store/00changelog.i: size=320384 (pure !) |
|
922 stream-clone-race-1/.hg/store/00changelog.n: size=70 (pure !) |
|
923 |
911 |
924 $ hg -R stream-clone-race-1 debugnodemap --metadata | tee client-metadata.txt |
912 $ hg -R stream-clone-race-1 debugnodemap --metadata | tee client-metadata.txt |
925 abort: repository stream-clone-race-1 not found (known-bad-output no-rust no-pure !) |
913 uid: * (glob) |
926 uid: * (glob) (rust !) |
914 tip-rev: 5005 |
927 tip-rev: 5005 (rust !) |
915 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
928 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe (rust !) |
916 data-length: 121088 |
929 data-length: 121088 (rust !) |
917 data-unused: 0 |
930 data-unused: 0 (rust !) |
918 data-unused: 0.000% |
931 data-unused: 0.000% (rust !) |
|
932 uid: * (glob) (pure !) |
|
933 tip-rev: 5005 (pure !) |
|
934 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe (pure !) |
|
935 data-length: 121088 (pure !) |
|
936 data-unused: 0 (pure !) |
|
937 data-unused: 0.000% (pure !) |
|
938 |
919 |
939 We get a usable nodemap, so no rewrite would be needed and the metadata should be identical |
920 We get a usable nodemap, so no rewrite would be needed and the metadata should be identical |
940 (ie: the following diff should be empty) |
921 (ie: the following diff should be empty) |
941 |
922 |
|
923 This isn't the case for the `no-rust` `no-pure` implementation as it use a very minimal nodemap implementation that unconditionnaly rewrite the nodemap "all the time". |
|
924 |
|
925 #if no-rust no-pure |
942 $ diff -u server-metadata.txt client-metadata.txt |
926 $ diff -u server-metadata.txt client-metadata.txt |
943 --- server-metadata.txt * (glob) (known-bad-output !) |
927 --- server-metadata.txt * (glob) |
944 +++ client-metadata.txt * (glob) (known-bad-output !) |
928 +++ client-metadata.txt * (glob) |
945 @@ -1,4 +1,4 @@ (known-bad-output rust !) |
929 @@ -1,4 +1,4 @@ |
946 @@ -1,4 +1,4 @@ (known-bad-output pure !) |
930 -uid: * (glob) |
947 @@ -1,6 +0,0 @@ (known-bad-output no-rust no-pure !) |
931 +uid: * (glob) |
948 -uid: * (glob) (known-bad-output !) |
932 tip-rev: 5005 |
949 +uid: * (glob) (known-bad-output rust !) |
933 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
950 tip-rev: 5005 (known-bad-output rust !) |
934 data-length: 121088 |
951 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe (known-bad-output rust !) |
|
952 data-length: 121088 (known-bad-output rust !) |
|
953 +uid: * (glob) (known-bad-output pure !) |
|
954 tip-rev: 5005 (known-bad-output pure !) |
|
955 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe (known-bad-output pure !) |
|
956 data-length: 121088 (known-bad-output pure !) |
|
957 -tip-rev: 5005 (known-bad-output no-rust no-pure !) |
|
958 -tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe (known-bad-output no-rust no-pure !) |
|
959 -data-length: 121088 (known-bad-output no-rust no-pure !) |
|
960 -data-unused: 0 (known-bad-output no-rust no-pure !) |
|
961 -data-unused: 0.000% (known-bad-output no-rust no-pure !) |
|
962 [1] |
935 [1] |
|
936 #else |
|
937 $ diff -u server-metadata.txt client-metadata.txt |
|
938 #endif |
|
939 |
963 |
940 |
964 Clean up after the test. |
941 Clean up after the test. |
965 |
942 |
966 $ rm -f "$HG_TEST_STREAM_WALKED_FILE_1" |
943 $ rm -f "$HG_TEST_STREAM_WALKED_FILE_1" |
967 $ rm -f "$HG_TEST_STREAM_WALKED_FILE_2" |
944 $ rm -f "$HG_TEST_STREAM_WALKED_FILE_2" |
989 $ hg -R test-repo debugnodemap --metadata | tee server-metadata-2.txt |
966 $ hg -R test-repo debugnodemap --metadata | tee server-metadata-2.txt |
990 uid: * (glob) |
967 uid: * (glob) |
991 tip-rev: 5006 |
968 tip-rev: 5006 |
992 tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b |
969 tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b |
993 data-length: 121344 (rust !) |
970 data-length: 121344 (rust !) |
|
971 data-length: 121344 (pure !) |
|
972 data-length: 121152 (no-rust no-pure !) |
|
973 data-unused: 192 (rust !) |
|
974 data-unused: 192 (pure !) |
|
975 data-unused: 0 (no-rust no-pure !) |
|
976 data-unused: 0.158% (rust !) |
|
977 data-unused: 0.158% (pure !) |
|
978 data-unused: 0.000% (no-rust no-pure !) |
|
979 |
|
980 Performe the mix of clone and full refresh of the nodemap, so that the files |
|
981 (and filenames) are different between listing time and actual transfer time. |
|
982 |
|
983 $ (hg clone -U --stream --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/test-repo stream-clone-race-2 --debug 2>> clone-output-2 | egrep '00(changelog|manifest)' >> clone-output-2; touch $HG_TEST_STREAM_WALKED_FILE_3) & |
|
984 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
|
985 $ rm test-repo/.hg/store/00changelog.n |
|
986 $ rm test-repo/.hg/store/00changelog-*.nd |
|
987 $ hg -R test-repo/ debugupdatecache |
|
988 $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
|
989 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
|
990 $ cat clone-output-2 |
|
991 adding [s] undo.backup.00manifest.n (70 bytes) (known-bad-output !) |
|
992 adding [s] undo.backup.00changelog.n (70 bytes) (known-bad-output !) |
|
993 adding [s] 00manifest.n (70 bytes) |
|
994 adding [s] 00manifest-*.nd (118 KB) (glob) |
|
995 adding [s] 00changelog.n (70 bytes) |
|
996 adding [s] 00changelog-*.nd (118 KB) (glob) |
|
997 adding [s] 00manifest.d (492 KB) (zstd !) |
|
998 adding [s] 00manifest.d (452 KB) (no-zstd !) |
|
999 adding [s] 00changelog.d (360 KB) (no-zstd !) |
|
1000 adding [s] 00changelog.d (368 KB) (zstd !) |
|
1001 adding [s] 00manifest.i (313 KB) |
|
1002 adding [s] 00changelog.i (313 KB) |
|
1003 |
|
1004 Check the result. |
|
1005 |
|
1006 $ f --size stream-clone-race-2/.hg/store/00changelog* |
|
1007 stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !) |
|
1008 stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !) |
|
1009 stream-clone-race-2/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !) |
|
1010 stream-clone-race-2/.hg/store/00changelog.d: size=376950 (zstd !) |
|
1011 stream-clone-race-2/.hg/store/00changelog.d: size=368949 (no-zstd !) |
|
1012 stream-clone-race-2/.hg/store/00changelog.i: size=320448 |
|
1013 stream-clone-race-2/.hg/store/00changelog.n: size=70 |
|
1014 |
|
1015 $ hg -R stream-clone-race-2 debugnodemap --metadata | tee client-metadata-2.txt |
|
1016 uid: * (glob) |
|
1017 tip-rev: 5006 |
|
1018 tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b |
|
1019 data-length: 121344 (rust !) |
994 data-unused: 192 (rust !) |
1020 data-unused: 192 (rust !) |
995 data-unused: 0.158% (rust !) |
1021 data-unused: 0.158% (rust !) |
996 data-length: 121152 (no-rust no-pure !) |
1022 data-length: 121152 (no-rust no-pure !) |
997 data-unused: 0 (no-rust no-pure !) |
1023 data-unused: 0 (no-rust no-pure !) |
998 data-unused: 0.000% (no-rust no-pure !) |
1024 data-unused: 0.000% (no-rust no-pure !) |
999 data-length: 121344 (pure !) |
1025 data-length: 121344 (pure !) |
1000 data-unused: 192 (pure !) |
1026 data-unused: 192 (pure !) |
1001 data-unused: 0.158% (pure !) |
1027 data-unused: 0.158% (pure !) |
1002 |
1028 |
1003 Performe the mix of clone and full refresh of the nodemap, so that the files |
|
1004 (and filenames) are different between listing time and actual transfer time. |
|
1005 |
|
1006 $ (hg clone -U --stream --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/test-repo stream-clone-race-2 --debug 2>> clone-output-2 | egrep '00(changelog|manifest)' >> clone-output-2; touch $HG_TEST_STREAM_WALKED_FILE_3) & |
|
1007 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
|
1008 $ rm test-repo/.hg/store/00changelog.n |
|
1009 $ rm test-repo/.hg/store/00changelog-*.nd |
|
1010 $ hg -R test-repo/ debugupdatecache |
|
1011 $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
|
1012 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
|
1013 $ cat clone-output-2 |
|
1014 remote: abort: unexpected error: [Errno 2] $ENOENT$: *'$TESTTMP/test-repo/.hg/store/00changelog-*.nd' (glob) (known-bad-output rust !) |
|
1015 remote: abort: unexpected error: [Errno 2] $ENOENT$: *'$TESTTMP/test-repo/.hg/store/00changelog-*.nd' (glob) (known-bad-output pure !) |
|
1016 remote: abort: unexpected error: [Errno 2] $ENOENT$: *'$TESTTMP/test-repo/.hg/store/00manifest-*.nd' (glob) (known-bad-output no-pure no-rust !) |
|
1017 abort: pull failed on remote (known-bad-output !) |
|
1018 adding [s] undo.backup.00manifest.n (70 bytes) (known-bad-output !) |
|
1019 adding [s] undo.backup.00changelog.n (70 bytes) (known-bad-output !) |
|
1020 adding [s] 00manifest.n (70 bytes) |
|
1021 adding [s] 00manifest.d (492 KB) (zstd !) |
|
1022 adding [s] 00manifest.d (452 KB) (no-zstd !) |
|
1023 adding [s] 00manifest-*.nd (118 KB) (glob) (rust !) |
|
1024 adding [s] 00manifest-*.nd (118 KB) (glob) (pure !) |
|
1025 remote: abort: $ENOENT$: '$TESTTMP/test-repo/.hg/store/00changelog-*.nd' (glob) (known-bad-output rust !) |
|
1026 remote: abort: $ENOENT$: '$TESTTMP/test-repo/.hg/store/00manifest-*.nd' (glob) (known-bad-output no-pure no-rust !) |
|
1027 adding [s] 00changelog.n (70 bytes) (pure !) |
|
1028 adding [s] 00changelog.d (360 KB) (no-zstd !) |
|
1029 remote: abort: $ENOENT$: '$TESTTMP/test-repo/.hg/store/00changelog-*.nd' (glob) (known-bad-output pure !) |
|
1030 |
|
1031 Check the result. |
|
1032 |
|
1033 $ f --size stream-clone-race-2/.hg/store/00changelog* |
|
1034 stream-clone-race-2/.hg/store/00changelog*: file not found (known-bad-output !) |
|
1035 |
|
1036 $ hg -R stream-clone-race-2 debugnodemap --metadata | tee client-metadata-2.txt |
|
1037 abort: repository stream-clone-race-2 not found (known-bad-output !) |
|
1038 |
|
1039 We get a usable nodemap, so no rewrite would be needed and the metadata should be identical |
1029 We get a usable nodemap, so no rewrite would be needed and the metadata should be identical |
1040 (ie: the following diff should be empty) |
1030 (ie: the following diff should be empty) |
1041 |
1031 |
|
1032 This isn't the case for the `no-rust` `no-pure` implementation as it use a very minimal nodemap implementation that unconditionnaly rewrite the nodemap "all the time". |
|
1033 |
|
1034 #if no-rust no-pure |
1042 $ diff -u server-metadata-2.txt client-metadata-2.txt |
1035 $ diff -u server-metadata-2.txt client-metadata-2.txt |
1043 --- server-metadata-2.txt * (glob) (known-bad-output !) |
1036 --- server-metadata-2.txt * (glob) |
1044 +++ client-metadata-2.txt * (glob) (known-bad-output !) |
1037 +++ client-metadata-2.txt * (glob) |
1045 @@ -1,6 +0,0 @@ (known-bad-output !) |
1038 @@ -1,4 +1,4 @@ |
1046 -uid: * (glob) (known-bad-output !) |
1039 -uid: * (glob) |
1047 -tip-rev: 5006 (known-bad-output !) |
1040 +uid: * (glob) |
1048 -tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b (known-bad-output !) |
1041 tip-rev: 5006 |
1049 -data-length: 121344 (known-bad-output rust !) |
1042 tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b |
1050 -data-unused: 192 (known-bad-output rust !) |
1043 data-length: 121152 |
1051 -data-unused: 0.158% (known-bad-output rust !) |
|
1052 -data-length: 121344 (known-bad-output pure !) |
|
1053 -data-unused: 192 (known-bad-output pure !) |
|
1054 -data-unused: 0.158% (known-bad-output pure !) |
|
1055 -data-length: 121152 (known-bad-output no-rust no-pure !) |
|
1056 -data-unused: 0 (known-bad-output no-rust no-pure !) |
|
1057 -data-unused: 0.000% (known-bad-output no-rust no-pure !) |
|
1058 [1] |
1044 [1] |
|
1045 #else |
|
1046 $ diff -u server-metadata-2.txt client-metadata-2.txt |
|
1047 #endif |
1059 |
1048 |
1060 Clean up after the test |
1049 Clean up after the test |
1061 |
1050 |
1062 $ rm -f $HG_TEST_STREAM_WALKED_FILE_1 |
1051 $ rm -f $HG_TEST_STREAM_WALKED_FILE_1 |
1063 $ rm -f $HG_TEST_STREAM_WALKED_FILE_2 |
1052 $ rm -f $HG_TEST_STREAM_WALKED_FILE_2 |