Show More
@@ -1,1255 +1,1256 b'' | |||||
1 | =================================== |
|
1 | =================================== | |
2 | Test the persistent on-disk nodemap |
|
2 | Test the persistent on-disk nodemap | |
3 | =================================== |
|
3 | =================================== | |
4 |
|
4 | |||
5 |
|
5 | |||
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [format] |
|
7 | > [format] | |
8 | > use-share-safe=yes |
|
8 | > use-share-safe=yes | |
9 | > [extensions] |
|
9 | > [extensions] | |
10 | > share= |
|
10 | > share= | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | #if no-rust |
|
13 | #if no-rust | |
14 |
|
14 | |||
15 | $ cat << EOF >> $HGRCPATH |
|
15 | $ cat << EOF >> $HGRCPATH | |
16 | > [format] |
|
16 | > [format] | |
17 | > use-persistent-nodemap=yes |
|
17 | > use-persistent-nodemap=yes | |
18 | > [devel] |
|
18 | > [devel] | |
19 | > persistent-nodemap=yes |
|
19 | > persistent-nodemap=yes | |
20 | > EOF |
|
20 | > EOF | |
21 |
|
21 | |||
22 | #endif |
|
22 | #endif | |
23 |
|
23 | |||
24 | $ hg init test-repo --config storage.revlog.persistent-nodemap.slow-path=allow |
|
24 | $ hg init test-repo --config storage.revlog.persistent-nodemap.slow-path=allow | |
25 | $ cd test-repo |
|
25 | $ cd test-repo | |
26 |
|
26 | |||
27 | Check handling of the default slow-path value |
|
27 | Check handling of the default slow-path value | |
28 |
|
28 | |||
29 | #if no-pure no-rust |
|
29 | #if no-pure no-rust | |
30 |
|
30 | |||
31 | $ hg id |
|
31 | $ hg id | |
32 | abort: accessing `persistent-nodemap` repository without associated fast implementation. |
|
32 | abort: accessing `persistent-nodemap` repository without associated fast implementation. | |
33 | (check `hg help config.format.use-persistent-nodemap` for details) |
|
33 | (check `hg help config.format.use-persistent-nodemap` for details) | |
34 | [255] |
|
34 | [255] | |
35 |
|
35 | |||
36 | Unlock further check (we are here to test the feature) |
|
36 | Unlock further check (we are here to test the feature) | |
37 |
|
37 | |||
38 | $ cat << EOF >> $HGRCPATH |
|
38 | $ cat << EOF >> $HGRCPATH | |
39 | > [storage] |
|
39 | > [storage] | |
40 | > # to avoid spamming the test |
|
40 | > # to avoid spamming the test | |
41 | > revlog.persistent-nodemap.slow-path=allow |
|
41 | > revlog.persistent-nodemap.slow-path=allow | |
42 | > EOF |
|
42 | > EOF | |
43 |
|
43 | |||
44 | #endif |
|
44 | #endif | |
45 |
|
45 | |||
46 | #if rust |
|
46 | #if rust | |
47 |
|
47 | |||
48 | Regression test for a previous bug in Rust/C FFI for the `Revlog_CAPI` capsule: |
|
48 | Regression test for a previous bug in Rust/C FFI for the `Revlog_CAPI` capsule: | |
49 | in places where `mercurial/cext/revlog.c` function signatures use `Py_ssize_t` |
|
49 | in places where `mercurial/cext/revlog.c` function signatures use `Py_ssize_t` | |
50 | (64 bits on Linux x86_64), corresponding declarations in `rust/hg-cpython/src/cindex.rs` |
|
50 | (64 bits on Linux x86_64), corresponding declarations in `rust/hg-cpython/src/cindex.rs` | |
51 | incorrectly used `libc::c_int` (32 bits). |
|
51 | incorrectly used `libc::c_int` (32 bits). | |
52 | As a result, -1 passed from Rust for the null revision became 4294967295 in C. |
|
52 | As a result, -1 passed from Rust for the null revision became 4294967295 in C. | |
53 |
|
53 | |||
54 | $ hg log -r 00000000 |
|
54 | $ hg log -r 00000000 | |
55 | changeset: -1:000000000000 |
|
55 | changeset: -1:000000000000 | |
56 | tag: tip |
|
56 | tag: tip | |
57 | user: |
|
57 | user: | |
58 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | #endif |
|
61 | #endif | |
62 |
|
62 | |||
63 |
|
63 | |||
64 | $ hg debugformat |
|
64 | $ hg debugformat | |
65 | format-variant repo |
|
65 | format-variant repo | |
66 | fncache: yes |
|
66 | fncache: yes | |
67 | dirstate-v2: no |
|
67 | dirstate-v2: no | |
68 | dotencode: yes |
|
68 | dotencode: yes | |
69 | generaldelta: yes |
|
69 | generaldelta: yes | |
70 | share-safe: yes |
|
70 | share-safe: yes | |
71 | sparserevlog: yes |
|
71 | sparserevlog: yes | |
72 | persistent-nodemap: yes |
|
72 | persistent-nodemap: yes | |
73 | copies-sdc: no |
|
73 | copies-sdc: no | |
74 | revlog-v2: no |
|
74 | revlog-v2: no | |
75 | changelog-v2: no |
|
75 | changelog-v2: no | |
76 | plain-cl-delta: yes |
|
76 | plain-cl-delta: yes | |
77 | compression: zlib (no-zstd !) |
|
77 | compression: zlib (no-zstd !) | |
78 | compression: zstd (zstd !) |
|
78 | compression: zstd (zstd !) | |
79 | compression-level: default |
|
79 | compression-level: default | |
80 | $ hg debugbuilddag .+5000 --new-file |
|
80 | $ hg debugbuilddag .+5000 --new-file | |
81 |
|
81 | |||
82 | $ hg debugnodemap --metadata |
|
82 | $ hg debugnodemap --metadata | |
83 | uid: ???????? (glob) |
|
83 | uid: ???????? (glob) | |
84 | tip-rev: 5000 |
|
84 | tip-rev: 5000 | |
85 | tip-node: 6b02b8c7b96654c25e86ba69eda198d7e6ad8b3c |
|
85 | tip-node: 6b02b8c7b96654c25e86ba69eda198d7e6ad8b3c | |
86 | data-length: 121088 |
|
86 | data-length: 121088 | |
87 | data-unused: 0 |
|
87 | data-unused: 0 | |
88 | data-unused: 0.000% |
|
88 | data-unused: 0.000% | |
89 | $ f --size .hg/store/00changelog.n |
|
89 | $ f --size .hg/store/00changelog.n | |
90 | .hg/store/00changelog.n: size=62 |
|
90 | .hg/store/00changelog.n: size=62 | |
91 |
|
91 | |||
92 | Simple lookup works |
|
92 | Simple lookup works | |
93 |
|
93 | |||
94 | $ ANYNODE=`hg log --template '{node|short}\n' --rev tip` |
|
94 | $ ANYNODE=`hg log --template '{node|short}\n' --rev tip` | |
95 | $ hg log -r "$ANYNODE" --template '{rev}\n' |
|
95 | $ hg log -r "$ANYNODE" --template '{rev}\n' | |
96 | 5000 |
|
96 | 5000 | |
97 |
|
97 | |||
98 |
|
98 | |||
99 | #if rust |
|
99 | #if rust | |
100 |
|
100 | |||
101 | $ f --sha256 .hg/store/00changelog-*.nd |
|
101 | $ f --sha256 .hg/store/00changelog-*.nd | |
102 | .hg/store/00changelog-????????.nd: sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd (glob) |
|
102 | .hg/store/00changelog-????????.nd: sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd (glob) | |
103 |
|
103 | |||
104 | $ f --sha256 .hg/store/00manifest-*.nd |
|
104 | $ f --sha256 .hg/store/00manifest-*.nd | |
105 | .hg/store/00manifest-????????.nd: sha256=97117b1c064ea2f86664a124589e47db0e254e8d34739b5c5cc5bf31c9da2b51 (glob) |
|
105 | .hg/store/00manifest-????????.nd: sha256=97117b1c064ea2f86664a124589e47db0e254e8d34739b5c5cc5bf31c9da2b51 (glob) | |
106 | $ hg debugnodemap --dump-new | f --sha256 --size |
|
106 | $ hg debugnodemap --dump-new | f --sha256 --size | |
107 | size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd |
|
107 | size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd | |
108 | $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size |
|
108 | $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size | |
109 | size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd |
|
109 | size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd | |
110 | 0000: 00 00 00 91 00 00 00 20 00 00 00 bb 00 00 00 e7 |....... ........| |
|
110 | 0000: 00 00 00 91 00 00 00 20 00 00 00 bb 00 00 00 e7 |....... ........| | |
111 | 0010: 00 00 00 66 00 00 00 a1 00 00 01 13 00 00 01 22 |...f..........."| |
|
111 | 0010: 00 00 00 66 00 00 00 a1 00 00 01 13 00 00 01 22 |...f..........."| | |
112 | 0020: 00 00 00 23 00 00 00 fc 00 00 00 ba 00 00 00 5e |...#...........^| |
|
112 | 0020: 00 00 00 23 00 00 00 fc 00 00 00 ba 00 00 00 5e |...#...........^| | |
113 | 0030: 00 00 00 df 00 00 01 4e 00 00 01 65 00 00 00 ab |.......N...e....| |
|
113 | 0030: 00 00 00 df 00 00 01 4e 00 00 01 65 00 00 00 ab |.......N...e....| | |
114 | 0040: 00 00 00 a9 00 00 00 95 00 00 00 73 00 00 00 38 |...........s...8| |
|
114 | 0040: 00 00 00 a9 00 00 00 95 00 00 00 73 00 00 00 38 |...........s...8| | |
115 | 0050: 00 00 00 cc 00 00 00 92 00 00 00 90 00 00 00 69 |...............i| |
|
115 | 0050: 00 00 00 cc 00 00 00 92 00 00 00 90 00 00 00 69 |...............i| | |
116 | 0060: 00 00 00 ec 00 00 00 8d 00 00 01 4f 00 00 00 12 |...........O....| |
|
116 | 0060: 00 00 00 ec 00 00 00 8d 00 00 01 4f 00 00 00 12 |...........O....| | |
117 | 0070: 00 00 02 0c 00 00 00 77 00 00 00 9c 00 00 00 8f |.......w........| |
|
117 | 0070: 00 00 02 0c 00 00 00 77 00 00 00 9c 00 00 00 8f |.......w........| | |
118 | 0080: 00 00 00 d5 00 00 00 6b 00 00 00 48 00 00 00 b3 |.......k...H....| |
|
118 | 0080: 00 00 00 d5 00 00 00 6b 00 00 00 48 00 00 00 b3 |.......k...H....| | |
119 | 0090: 00 00 00 e5 00 00 00 b5 00 00 00 8e 00 00 00 ad |................| |
|
119 | 0090: 00 00 00 e5 00 00 00 b5 00 00 00 8e 00 00 00 ad |................| | |
120 | 00a0: 00 00 00 7b 00 00 00 7c 00 00 00 0b 00 00 00 2b |...{...|.......+| |
|
120 | 00a0: 00 00 00 7b 00 00 00 7c 00 00 00 0b 00 00 00 2b |...{...|.......+| | |
121 | 00b0: 00 00 00 c6 00 00 00 1e 00 00 01 08 00 00 00 11 |................| |
|
121 | 00b0: 00 00 00 c6 00 00 00 1e 00 00 01 08 00 00 00 11 |................| | |
122 | 00c0: 00 00 01 30 00 00 00 26 00 00 01 9c 00 00 00 35 |...0...&.......5| |
|
122 | 00c0: 00 00 01 30 00 00 00 26 00 00 01 9c 00 00 00 35 |...0...&.......5| | |
123 | 00d0: 00 00 00 b8 00 00 01 31 00 00 00 2c 00 00 00 55 |.......1...,...U| |
|
123 | 00d0: 00 00 00 b8 00 00 01 31 00 00 00 2c 00 00 00 55 |.......1...,...U| | |
124 | 00e0: 00 00 00 8a 00 00 00 9a 00 00 00 0c 00 00 01 1e |................| |
|
124 | 00e0: 00 00 00 8a 00 00 00 9a 00 00 00 0c 00 00 01 1e |................| | |
125 | 00f0: 00 00 00 a4 00 00 00 83 00 00 00 c9 00 00 00 8c |................| |
|
125 | 00f0: 00 00 00 a4 00 00 00 83 00 00 00 c9 00 00 00 8c |................| | |
126 |
|
126 | |||
127 |
|
127 | |||
128 | #else |
|
128 | #else | |
129 |
|
129 | |||
130 | $ f --sha256 .hg/store/00changelog-*.nd |
|
130 | $ f --sha256 .hg/store/00changelog-*.nd | |
131 | .hg/store/00changelog-????????.nd: sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 (glob) |
|
131 | .hg/store/00changelog-????????.nd: sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 (glob) | |
132 | $ hg debugnodemap --dump-new | f --sha256 --size |
|
132 | $ hg debugnodemap --dump-new | f --sha256 --size | |
133 | size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 |
|
133 | size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 | |
134 | $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size |
|
134 | $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size | |
135 | size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 |
|
135 | size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 | |
136 | 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
136 | 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
137 | 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
137 | 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
138 | 0020: ff ff ff ff ff ff f5 06 ff ff ff ff ff ff f3 e7 |................| |
|
138 | 0020: ff ff ff ff ff ff f5 06 ff ff ff ff ff ff f3 e7 |................| | |
139 | 0030: ff ff ef ca ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
139 | 0030: ff ff ef ca ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
140 | 0040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
140 | 0040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
141 | 0050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ed 08 |................| |
|
141 | 0050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ed 08 |................| | |
142 | 0060: ff ff ed 66 ff ff ff ff ff ff ff ff ff ff ff ff |...f............| |
|
142 | 0060: ff ff ed 66 ff ff ff ff ff ff ff ff ff ff ff ff |...f............| | |
143 | 0070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
143 | 0070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
144 | 0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
144 | 0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
145 | 0090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f6 ed |................| |
|
145 | 0090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f6 ed |................| | |
146 | 00a0: ff ff ff ff ff ff fe 61 ff ff ff ff ff ff ff ff |.......a........| |
|
146 | 00a0: ff ff ff ff ff ff fe 61 ff ff ff ff ff ff ff ff |.......a........| | |
147 | 00b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
147 | 00b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
148 | 00c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
148 | 00c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
149 | 00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
|
149 | 00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| | |
150 | 00e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f1 02 |................| |
|
150 | 00e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f1 02 |................| | |
151 | 00f0: ff ff ff ff ff ff ed 1b ff ff ff ff ff ff ff ff |................| |
|
151 | 00f0: ff ff ff ff ff ff ed 1b ff ff ff ff ff ff ff ff |................| | |
152 |
|
152 | |||
153 | #endif |
|
153 | #endif | |
154 |
|
154 | |||
155 | $ hg debugnodemap --check |
|
155 | $ hg debugnodemap --check | |
156 | revision in index: 5001 |
|
156 | revision in index: 5001 | |
157 | revision in nodemap: 5001 |
|
157 | revision in nodemap: 5001 | |
158 |
|
158 | |||
159 | add a new commit |
|
159 | add a new commit | |
160 |
|
160 | |||
161 | $ hg up |
|
161 | $ hg up | |
162 | 5001 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
162 | 5001 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
163 | $ echo foo > foo |
|
163 | $ echo foo > foo | |
164 | $ hg add foo |
|
164 | $ hg add foo | |
165 |
|
165 | |||
166 |
|
166 | |||
167 | Check slow-path config value handling |
|
167 | Check slow-path config value handling | |
168 | ------------------------------------- |
|
168 | ------------------------------------- | |
169 |
|
169 | |||
170 | #if no-pure no-rust |
|
170 | #if no-pure no-rust | |
171 |
|
171 | |||
172 | $ hg id --config "storage.revlog.persistent-nodemap.slow-path=invalid-value" |
|
172 | $ hg id --config "storage.revlog.persistent-nodemap.slow-path=invalid-value" | |
173 | unknown value for config "storage.revlog.persistent-nodemap.slow-path": "invalid-value" |
|
173 | unknown value for config "storage.revlog.persistent-nodemap.slow-path": "invalid-value" | |
174 | falling back to default value: abort |
|
174 | falling back to default value: abort | |
175 | abort: accessing `persistent-nodemap` repository without associated fast implementation. |
|
175 | abort: accessing `persistent-nodemap` repository without associated fast implementation. | |
176 | (check `hg help config.format.use-persistent-nodemap` for details) |
|
176 | (check `hg help config.format.use-persistent-nodemap` for details) | |
177 | [255] |
|
177 | [255] | |
178 |
|
178 | |||
179 | $ hg log -r . --config "storage.revlog.persistent-nodemap.slow-path=warn" |
|
179 | $ hg log -r . --config "storage.revlog.persistent-nodemap.slow-path=warn" | |
180 | warning: accessing `persistent-nodemap` repository without associated fast implementation. |
|
180 | warning: accessing `persistent-nodemap` repository without associated fast implementation. | |
181 | (check `hg help config.format.use-persistent-nodemap` for details) |
|
181 | (check `hg help config.format.use-persistent-nodemap` for details) | |
182 | changeset: 5000:6b02b8c7b966 |
|
182 | changeset: 5000:6b02b8c7b966 | |
183 | tag: tip |
|
183 | tag: tip | |
184 | user: debugbuilddag |
|
184 | user: debugbuilddag | |
185 | date: Thu Jan 01 01:23:20 1970 +0000 |
|
185 | date: Thu Jan 01 01:23:20 1970 +0000 | |
186 | summary: r5000 |
|
186 | summary: r5000 | |
187 |
|
187 | |||
188 | $ hg ci -m 'foo' --config "storage.revlog.persistent-nodemap.slow-path=abort" |
|
188 | $ hg ci -m 'foo' --config "storage.revlog.persistent-nodemap.slow-path=abort" | |
189 | abort: accessing `persistent-nodemap` repository without associated fast implementation. |
|
189 | abort: accessing `persistent-nodemap` repository without associated fast implementation. | |
190 | (check `hg help config.format.use-persistent-nodemap` for details) |
|
190 | (check `hg help config.format.use-persistent-nodemap` for details) | |
191 | [255] |
|
191 | [255] | |
192 |
|
192 | |||
193 | #else |
|
193 | #else | |
194 |
|
194 | |||
195 | $ hg id --config "storage.revlog.persistent-nodemap.slow-path=invalid-value" |
|
195 | $ hg id --config "storage.revlog.persistent-nodemap.slow-path=invalid-value" | |
196 | unknown value for config "storage.revlog.persistent-nodemap.slow-path": "invalid-value" |
|
196 | unknown value for config "storage.revlog.persistent-nodemap.slow-path": "invalid-value" | |
197 | falling back to default value: abort |
|
197 | falling back to default value: abort | |
198 | 6b02b8c7b966+ tip |
|
198 | 6b02b8c7b966+ tip | |
199 |
|
199 | |||
200 | #endif |
|
200 | #endif | |
201 |
|
201 | |||
202 | $ hg ci -m 'foo' |
|
202 | $ hg ci -m 'foo' | |
203 |
|
203 | |||
204 | #if no-pure no-rust |
|
204 | #if no-pure no-rust | |
205 | $ hg debugnodemap --metadata |
|
205 | $ hg debugnodemap --metadata | |
206 | uid: ???????? (glob) |
|
206 | uid: ???????? (glob) | |
207 | tip-rev: 5001 |
|
207 | tip-rev: 5001 | |
208 | tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c |
|
208 | tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c | |
209 | data-length: 121088 |
|
209 | data-length: 121088 | |
210 | data-unused: 0 |
|
210 | data-unused: 0 | |
211 | data-unused: 0.000% |
|
211 | data-unused: 0.000% | |
212 | #else |
|
212 | #else | |
213 | $ hg debugnodemap --metadata |
|
213 | $ hg debugnodemap --metadata | |
214 | uid: ???????? (glob) |
|
214 | uid: ???????? (glob) | |
215 | tip-rev: 5001 |
|
215 | tip-rev: 5001 | |
216 | tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c |
|
216 | tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c | |
217 | data-length: 121344 |
|
217 | data-length: 121344 | |
218 | data-unused: 256 |
|
218 | data-unused: 256 | |
219 | data-unused: 0.211% |
|
219 | data-unused: 0.211% | |
220 | #endif |
|
220 | #endif | |
221 |
|
221 | |||
222 | $ f --size .hg/store/00changelog.n |
|
222 | $ f --size .hg/store/00changelog.n | |
223 | .hg/store/00changelog.n: size=62 |
|
223 | .hg/store/00changelog.n: size=62 | |
224 |
|
224 | |||
225 | (The pure code use the debug code that perform incremental update, the C code reencode from scratch) |
|
225 | (The pure code use the debug code that perform incremental update, the C code reencode from scratch) | |
226 |
|
226 | |||
227 | #if pure |
|
227 | #if pure | |
228 | $ f --sha256 .hg/store/00changelog-*.nd --size |
|
228 | $ f --sha256 .hg/store/00changelog-*.nd --size | |
229 | .hg/store/00changelog-????????.nd: size=121344, sha256=cce54c5da5bde3ad72a4938673ed4064c86231b9c64376b082b163fdb20f8f66 (glob) |
|
229 | .hg/store/00changelog-????????.nd: size=121344, sha256=cce54c5da5bde3ad72a4938673ed4064c86231b9c64376b082b163fdb20f8f66 (glob) | |
230 | #endif |
|
230 | #endif | |
231 |
|
231 | |||
232 | #if rust |
|
232 | #if rust | |
233 | $ f --sha256 .hg/store/00changelog-*.nd --size |
|
233 | $ f --sha256 .hg/store/00changelog-*.nd --size | |
234 | .hg/store/00changelog-????????.nd: size=121344, sha256=952b042fcf614ceb37b542b1b723e04f18f83efe99bee4e0f5ccd232ef470e58 (glob) |
|
234 | .hg/store/00changelog-????????.nd: size=121344, sha256=952b042fcf614ceb37b542b1b723e04f18f83efe99bee4e0f5ccd232ef470e58 (glob) | |
235 | #endif |
|
235 | #endif | |
236 |
|
236 | |||
237 | #if no-pure no-rust |
|
237 | #if no-pure no-rust | |
238 | $ f --sha256 .hg/store/00changelog-*.nd --size |
|
238 | $ f --sha256 .hg/store/00changelog-*.nd --size | |
239 | .hg/store/00changelog-????????.nd: size=121088, sha256=df7c06a035b96cb28c7287d349d603baef43240be7736fe34eea419a49702e17 (glob) |
|
239 | .hg/store/00changelog-????????.nd: size=121088, sha256=df7c06a035b96cb28c7287d349d603baef43240be7736fe34eea419a49702e17 (glob) | |
240 | #endif |
|
240 | #endif | |
241 |
|
241 | |||
242 | $ hg debugnodemap --check |
|
242 | $ hg debugnodemap --check | |
243 | revision in index: 5002 |
|
243 | revision in index: 5002 | |
244 | revision in nodemap: 5002 |
|
244 | revision in nodemap: 5002 | |
245 |
|
245 | |||
246 | Test code path without mmap |
|
246 | Test code path without mmap | |
247 | --------------------------- |
|
247 | --------------------------- | |
248 |
|
248 | |||
249 | $ echo bar > bar |
|
249 | $ echo bar > bar | |
250 | $ hg add bar |
|
250 | $ hg add bar | |
251 | $ hg ci -m 'bar' --config storage.revlog.persistent-nodemap.mmap=no |
|
251 | $ hg ci -m 'bar' --config storage.revlog.persistent-nodemap.mmap=no | |
252 |
|
252 | |||
253 | $ hg debugnodemap --check --config storage.revlog.persistent-nodemap.mmap=yes |
|
253 | $ hg debugnodemap --check --config storage.revlog.persistent-nodemap.mmap=yes | |
254 | revision in index: 5003 |
|
254 | revision in index: 5003 | |
255 | revision in nodemap: 5003 |
|
255 | revision in nodemap: 5003 | |
256 | $ hg debugnodemap --check --config storage.revlog.persistent-nodemap.mmap=no |
|
256 | $ hg debugnodemap --check --config storage.revlog.persistent-nodemap.mmap=no | |
257 | revision in index: 5003 |
|
257 | revision in index: 5003 | |
258 | revision in nodemap: 5003 |
|
258 | revision in nodemap: 5003 | |
259 |
|
259 | |||
260 |
|
260 | |||
261 | #if pure |
|
261 | #if pure | |
262 | $ hg debugnodemap --metadata |
|
262 | $ hg debugnodemap --metadata | |
263 | uid: ???????? (glob) |
|
263 | uid: ???????? (glob) | |
264 | tip-rev: 5002 |
|
264 | tip-rev: 5002 | |
265 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd |
|
265 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd | |
266 | data-length: 121600 |
|
266 | data-length: 121600 | |
267 | data-unused: 512 |
|
267 | data-unused: 512 | |
268 | data-unused: 0.421% |
|
268 | data-unused: 0.421% | |
269 | $ f --sha256 .hg/store/00changelog-*.nd --size |
|
269 | $ f --sha256 .hg/store/00changelog-*.nd --size | |
270 | .hg/store/00changelog-????????.nd: size=121600, sha256=def52503d049ccb823974af313a98a935319ba61f40f3aa06a8be4d35c215054 (glob) |
|
270 | .hg/store/00changelog-????????.nd: size=121600, sha256=def52503d049ccb823974af313a98a935319ba61f40f3aa06a8be4d35c215054 (glob) | |
271 | #endif |
|
271 | #endif | |
272 | #if rust |
|
272 | #if rust | |
273 | $ hg debugnodemap --metadata |
|
273 | $ hg debugnodemap --metadata | |
274 | uid: ???????? (glob) |
|
274 | uid: ???????? (glob) | |
275 | tip-rev: 5002 |
|
275 | tip-rev: 5002 | |
276 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd |
|
276 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd | |
277 | data-length: 121600 |
|
277 | data-length: 121600 | |
278 | data-unused: 512 |
|
278 | data-unused: 512 | |
279 | data-unused: 0.421% |
|
279 | data-unused: 0.421% | |
280 | $ f --sha256 .hg/store/00changelog-*.nd --size |
|
280 | $ f --sha256 .hg/store/00changelog-*.nd --size | |
281 | .hg/store/00changelog-????????.nd: size=121600, sha256=dacf5b5f1d4585fee7527d0e67cad5b1ba0930e6a0928f650f779aefb04ce3fb (glob) |
|
281 | .hg/store/00changelog-????????.nd: size=121600, sha256=dacf5b5f1d4585fee7527d0e67cad5b1ba0930e6a0928f650f779aefb04ce3fb (glob) | |
282 | #endif |
|
282 | #endif | |
283 | #if no-pure no-rust |
|
283 | #if no-pure no-rust | |
284 | $ hg debugnodemap --metadata |
|
284 | $ hg debugnodemap --metadata | |
285 | uid: ???????? (glob) |
|
285 | uid: ???????? (glob) | |
286 | tip-rev: 5002 |
|
286 | tip-rev: 5002 | |
287 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd |
|
287 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd | |
288 | data-length: 121088 |
|
288 | data-length: 121088 | |
289 | data-unused: 0 |
|
289 | data-unused: 0 | |
290 | data-unused: 0.000% |
|
290 | data-unused: 0.000% | |
291 | $ f --sha256 .hg/store/00changelog-*.nd --size |
|
291 | $ f --sha256 .hg/store/00changelog-*.nd --size | |
292 | .hg/store/00changelog-????????.nd: size=121088, sha256=59fcede3e3cc587755916ceed29e3c33748cd1aa7d2f91828ac83e7979d935e8 (glob) |
|
292 | .hg/store/00changelog-????????.nd: size=121088, sha256=59fcede3e3cc587755916ceed29e3c33748cd1aa7d2f91828ac83e7979d935e8 (glob) | |
293 | #endif |
|
293 | #endif | |
294 |
|
294 | |||
295 | Test force warming the cache |
|
295 | Test force warming the cache | |
296 |
|
296 | |||
297 | $ rm .hg/store/00changelog.n |
|
297 | $ rm .hg/store/00changelog.n | |
298 | $ hg debugnodemap --metadata |
|
298 | $ hg debugnodemap --metadata | |
299 | $ hg debugupdatecache |
|
299 | $ hg debugupdatecache | |
300 | #if pure |
|
300 | #if pure | |
301 | $ hg debugnodemap --metadata |
|
301 | $ hg debugnodemap --metadata | |
302 | uid: ???????? (glob) |
|
302 | uid: ???????? (glob) | |
303 | tip-rev: 5002 |
|
303 | tip-rev: 5002 | |
304 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd |
|
304 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd | |
305 | data-length: 121088 |
|
305 | data-length: 121088 | |
306 | data-unused: 0 |
|
306 | data-unused: 0 | |
307 | data-unused: 0.000% |
|
307 | data-unused: 0.000% | |
308 | #else |
|
308 | #else | |
309 | $ hg debugnodemap --metadata |
|
309 | $ hg debugnodemap --metadata | |
310 | uid: ???????? (glob) |
|
310 | uid: ???????? (glob) | |
311 | tip-rev: 5002 |
|
311 | tip-rev: 5002 | |
312 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd |
|
312 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd | |
313 | data-length: 121088 |
|
313 | data-length: 121088 | |
314 | data-unused: 0 |
|
314 | data-unused: 0 | |
315 | data-unused: 0.000% |
|
315 | data-unused: 0.000% | |
316 | #endif |
|
316 | #endif | |
317 |
|
317 | |||
318 | Check out of sync nodemap |
|
318 | Check out of sync nodemap | |
319 | ========================= |
|
319 | ========================= | |
320 |
|
320 | |||
321 | First copy old data on the side. |
|
321 | First copy old data on the side. | |
322 |
|
322 | |||
323 | $ mkdir ../tmp-copies |
|
323 | $ mkdir ../tmp-copies | |
324 | $ cp .hg/store/00changelog-????????.nd .hg/store/00changelog.n ../tmp-copies |
|
324 | $ cp .hg/store/00changelog-????????.nd .hg/store/00changelog.n ../tmp-copies | |
325 |
|
325 | |||
326 | Nodemap lagging behind |
|
326 | Nodemap lagging behind | |
327 | ---------------------- |
|
327 | ---------------------- | |
328 |
|
328 | |||
329 | make a new commit |
|
329 | make a new commit | |
330 |
|
330 | |||
331 | $ echo bar2 > bar |
|
331 | $ echo bar2 > bar | |
332 | $ hg ci -m 'bar2' |
|
332 | $ hg ci -m 'bar2' | |
333 | $ NODE=`hg log -r tip -T '{node}\n'` |
|
333 | $ NODE=`hg log -r tip -T '{node}\n'` | |
334 | $ hg log -r "$NODE" -T '{rev}\n' |
|
334 | $ hg log -r "$NODE" -T '{rev}\n' | |
335 | 5003 |
|
335 | 5003 | |
336 |
|
336 | |||
337 | If the nodemap is lagging behind, it can catch up fine |
|
337 | If the nodemap is lagging behind, it can catch up fine | |
338 |
|
338 | |||
339 | $ hg debugnodemap --metadata |
|
339 | $ hg debugnodemap --metadata | |
340 | uid: ???????? (glob) |
|
340 | uid: ???????? (glob) | |
341 | tip-rev: 5003 |
|
341 | tip-rev: 5003 | |
342 | tip-node: c9329770f979ade2d16912267c38ba5f82fd37b3 |
|
342 | tip-node: c9329770f979ade2d16912267c38ba5f82fd37b3 | |
343 | data-length: 121344 (pure !) |
|
343 | data-length: 121344 (pure !) | |
344 | data-length: 121344 (rust !) |
|
344 | data-length: 121344 (rust !) | |
345 | data-length: 121152 (no-rust no-pure !) |
|
345 | data-length: 121152 (no-rust no-pure !) | |
346 | data-unused: 192 (pure !) |
|
346 | data-unused: 192 (pure !) | |
347 | data-unused: 192 (rust !) |
|
347 | data-unused: 192 (rust !) | |
348 | data-unused: 0 (no-rust no-pure !) |
|
348 | data-unused: 0 (no-rust no-pure !) | |
349 | data-unused: 0.158% (pure !) |
|
349 | data-unused: 0.158% (pure !) | |
350 | data-unused: 0.158% (rust !) |
|
350 | data-unused: 0.158% (rust !) | |
351 | data-unused: 0.000% (no-rust no-pure !) |
|
351 | data-unused: 0.000% (no-rust no-pure !) | |
352 | $ cp -f ../tmp-copies/* .hg/store/ |
|
352 | $ cp -f ../tmp-copies/* .hg/store/ | |
353 | $ hg debugnodemap --metadata |
|
353 | $ hg debugnodemap --metadata | |
354 | uid: ???????? (glob) |
|
354 | uid: ???????? (glob) | |
355 | tip-rev: 5002 |
|
355 | tip-rev: 5002 | |
356 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd |
|
356 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd | |
357 | data-length: 121088 |
|
357 | data-length: 121088 | |
358 | data-unused: 0 |
|
358 | data-unused: 0 | |
359 | data-unused: 0.000% |
|
359 | data-unused: 0.000% | |
360 | $ hg log -r "$NODE" -T '{rev}\n' |
|
360 | $ hg log -r "$NODE" -T '{rev}\n' | |
361 | 5003 |
|
361 | 5003 | |
362 |
|
362 | |||
363 | changelog altered |
|
363 | changelog altered | |
364 | ----------------- |
|
364 | ----------------- | |
365 |
|
365 | |||
366 | If the nodemap is not gated behind a requirements, an unaware client can alter |
|
366 | If the nodemap is not gated behind a requirements, an unaware client can alter | |
367 | the repository so the revlog used to generate the nodemap is not longer |
|
367 | the repository so the revlog used to generate the nodemap is not longer | |
368 | compatible with the persistent nodemap. We need to detect that. |
|
368 | compatible with the persistent nodemap. We need to detect that. | |
369 |
|
369 | |||
370 | $ hg up "$NODE~5" |
|
370 | $ hg up "$NODE~5" | |
371 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
371 | 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
372 | $ echo bar > babar |
|
372 | $ echo bar > babar | |
373 | $ hg add babar |
|
373 | $ hg add babar | |
374 | $ hg ci -m 'babar' |
|
374 | $ hg ci -m 'babar' | |
375 | created new head |
|
375 | created new head | |
376 | $ OTHERNODE=`hg log -r tip -T '{node}\n'` |
|
376 | $ OTHERNODE=`hg log -r tip -T '{node}\n'` | |
377 | $ hg log -r "$OTHERNODE" -T '{rev}\n' |
|
377 | $ hg log -r "$OTHERNODE" -T '{rev}\n' | |
378 | 5004 |
|
378 | 5004 | |
379 |
|
379 | |||
380 | $ hg --config extensions.strip= strip --rev "$NODE~1" --no-backup |
|
380 | $ hg --config extensions.strip= strip --rev "$NODE~1" --no-backup | |
381 |
|
381 | |||
382 | the nodemap should detect the changelog have been tampered with and recover. |
|
382 | the nodemap should detect the changelog have been tampered with and recover. | |
383 |
|
383 | |||
384 | $ hg debugnodemap --metadata |
|
384 | $ hg debugnodemap --metadata | |
385 | uid: ???????? (glob) |
|
385 | uid: ???????? (glob) | |
386 | tip-rev: 5002 |
|
386 | tip-rev: 5002 | |
387 | tip-node: b355ef8adce0949b8bdf6afc72ca853740d65944 |
|
387 | tip-node: b355ef8adce0949b8bdf6afc72ca853740d65944 | |
388 | data-length: 121536 (pure !) |
|
388 | data-length: 121536 (pure !) | |
389 | data-length: 121088 (rust !) |
|
389 | data-length: 121088 (rust !) | |
390 | data-length: 121088 (no-pure no-rust !) |
|
390 | data-length: 121088 (no-pure no-rust !) | |
391 | data-unused: 448 (pure !) |
|
391 | data-unused: 448 (pure !) | |
392 | data-unused: 0 (rust !) |
|
392 | data-unused: 0 (rust !) | |
393 | data-unused: 0 (no-pure no-rust !) |
|
393 | data-unused: 0 (no-pure no-rust !) | |
394 | data-unused: 0.000% (rust !) |
|
394 | data-unused: 0.000% (rust !) | |
395 | data-unused: 0.369% (pure !) |
|
395 | data-unused: 0.369% (pure !) | |
396 | data-unused: 0.000% (no-pure no-rust !) |
|
396 | data-unused: 0.000% (no-pure no-rust !) | |
397 |
|
397 | |||
398 | $ cp -f ../tmp-copies/* .hg/store/ |
|
398 | $ cp -f ../tmp-copies/* .hg/store/ | |
399 | $ hg debugnodemap --metadata |
|
399 | $ hg debugnodemap --metadata | |
400 | uid: ???????? (glob) |
|
400 | uid: ???????? (glob) | |
401 | tip-rev: 5002 |
|
401 | tip-rev: 5002 | |
402 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd |
|
402 | tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd | |
403 | data-length: 121088 |
|
403 | data-length: 121088 | |
404 | data-unused: 0 |
|
404 | data-unused: 0 | |
405 | data-unused: 0.000% |
|
405 | data-unused: 0.000% | |
406 | $ hg log -r "$OTHERNODE" -T '{rev}\n' |
|
406 | $ hg log -r "$OTHERNODE" -T '{rev}\n' | |
407 | 5002 |
|
407 | 5002 | |
408 |
|
408 | |||
409 | missing data file |
|
409 | missing data file | |
410 | ----------------- |
|
410 | ----------------- | |
411 |
|
411 | |||
412 | $ UUID=`hg debugnodemap --metadata| grep 'uid:' | \ |
|
412 | $ UUID=`hg debugnodemap --metadata| grep 'uid:' | \ | |
413 | > sed 's/uid: //'` |
|
413 | > sed 's/uid: //'` | |
414 | $ FILE=.hg/store/00changelog-"${UUID}".nd |
|
414 | $ FILE=.hg/store/00changelog-"${UUID}".nd | |
415 | $ mv $FILE ../tmp-data-file |
|
415 | $ mv $FILE ../tmp-data-file | |
416 | $ cp .hg/store/00changelog.n ../tmp-docket |
|
416 | $ cp .hg/store/00changelog.n ../tmp-docket | |
417 |
|
417 | |||
418 | mercurial don't crash |
|
418 | mercurial don't crash | |
419 |
|
419 | |||
420 | $ hg log -r . |
|
420 | $ hg log -r . | |
421 | changeset: 5002:b355ef8adce0 |
|
421 | changeset: 5002:b355ef8adce0 | |
422 | tag: tip |
|
422 | tag: tip | |
423 | parent: 4998:d918ad6d18d3 |
|
423 | parent: 4998:d918ad6d18d3 | |
424 | user: test |
|
424 | user: test | |
425 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
425 | date: Thu Jan 01 00:00:00 1970 +0000 | |
426 | summary: babar |
|
426 | summary: babar | |
427 |
|
427 | |||
428 | $ hg debugnodemap --metadata |
|
428 | $ hg debugnodemap --metadata | |
429 |
|
429 | |||
430 | $ hg debugupdatecache |
|
430 | $ hg debugupdatecache | |
431 | $ hg debugnodemap --metadata |
|
431 | $ hg debugnodemap --metadata | |
432 | uid: * (glob) |
|
432 | uid: * (glob) | |
433 | tip-rev: 5002 |
|
433 | tip-rev: 5002 | |
434 | tip-node: b355ef8adce0949b8bdf6afc72ca853740d65944 |
|
434 | tip-node: b355ef8adce0949b8bdf6afc72ca853740d65944 | |
435 | data-length: 121088 |
|
435 | data-length: 121088 | |
436 | data-unused: 0 |
|
436 | data-unused: 0 | |
437 | data-unused: 0.000% |
|
437 | data-unused: 0.000% | |
438 | $ mv ../tmp-data-file $FILE |
|
438 | $ mv ../tmp-data-file $FILE | |
439 | $ mv ../tmp-docket .hg/store/00changelog.n |
|
439 | $ mv ../tmp-docket .hg/store/00changelog.n | |
440 |
|
440 | |||
441 | Check transaction related property |
|
441 | Check transaction related property | |
442 | ================================== |
|
442 | ================================== | |
443 |
|
443 | |||
444 | An up to date nodemap should be available to shell hooks, |
|
444 | An up to date nodemap should be available to shell hooks, | |
445 |
|
445 | |||
446 | $ echo dsljfl > a |
|
446 | $ echo dsljfl > a | |
447 | $ hg add a |
|
447 | $ hg add a | |
448 | $ hg ci -m a |
|
448 | $ hg ci -m a | |
449 | $ hg debugnodemap --metadata |
|
449 | $ hg debugnodemap --metadata | |
450 | uid: ???????? (glob) |
|
450 | uid: ???????? (glob) | |
451 | tip-rev: 5003 |
|
451 | tip-rev: 5003 | |
452 | tip-node: a52c5079765b5865d97b993b303a18740113bbb2 |
|
452 | tip-node: a52c5079765b5865d97b993b303a18740113bbb2 | |
453 | data-length: 121088 |
|
453 | data-length: 121088 | |
454 | data-unused: 0 |
|
454 | data-unused: 0 | |
455 | data-unused: 0.000% |
|
455 | data-unused: 0.000% | |
456 | $ echo babar2 > babar |
|
456 | $ echo babar2 > babar | |
457 | $ hg ci -m 'babar2' --config "hooks.pretxnclose.nodemap-test=hg debugnodemap --metadata" |
|
457 | $ hg ci -m 'babar2' --config "hooks.pretxnclose.nodemap-test=hg debugnodemap --metadata" | |
458 | uid: ???????? (glob) |
|
458 | uid: ???????? (glob) | |
459 | tip-rev: 5004 |
|
459 | tip-rev: 5004 | |
460 | tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984 |
|
460 | tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984 | |
461 | data-length: 121280 (pure !) |
|
461 | data-length: 121280 (pure !) | |
462 | data-length: 121280 (rust !) |
|
462 | data-length: 121280 (rust !) | |
463 | data-length: 121088 (no-pure no-rust !) |
|
463 | data-length: 121088 (no-pure no-rust !) | |
464 | data-unused: 192 (pure !) |
|
464 | data-unused: 192 (pure !) | |
465 | data-unused: 192 (rust !) |
|
465 | data-unused: 192 (rust !) | |
466 | data-unused: 0 (no-pure no-rust !) |
|
466 | data-unused: 0 (no-pure no-rust !) | |
467 | data-unused: 0.158% (pure !) |
|
467 | data-unused: 0.158% (pure !) | |
468 | data-unused: 0.158% (rust !) |
|
468 | data-unused: 0.158% (rust !) | |
469 | data-unused: 0.000% (no-pure no-rust !) |
|
469 | data-unused: 0.000% (no-pure no-rust !) | |
470 | $ hg debugnodemap --metadata |
|
470 | $ hg debugnodemap --metadata | |
471 | uid: ???????? (glob) |
|
471 | uid: ???????? (glob) | |
472 | tip-rev: 5004 |
|
472 | tip-rev: 5004 | |
473 | tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984 |
|
473 | tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984 | |
474 | data-length: 121280 (pure !) |
|
474 | data-length: 121280 (pure !) | |
475 | data-length: 121280 (rust !) |
|
475 | data-length: 121280 (rust !) | |
476 | data-length: 121088 (no-pure no-rust !) |
|
476 | data-length: 121088 (no-pure no-rust !) | |
477 | data-unused: 192 (pure !) |
|
477 | data-unused: 192 (pure !) | |
478 | data-unused: 192 (rust !) |
|
478 | data-unused: 192 (rust !) | |
479 | data-unused: 0 (no-pure no-rust !) |
|
479 | data-unused: 0 (no-pure no-rust !) | |
480 | data-unused: 0.158% (pure !) |
|
480 | data-unused: 0.158% (pure !) | |
481 | data-unused: 0.158% (rust !) |
|
481 | data-unused: 0.158% (rust !) | |
482 | data-unused: 0.000% (no-pure no-rust !) |
|
482 | data-unused: 0.000% (no-pure no-rust !) | |
483 |
|
483 | |||
484 | Another process does not see the pending nodemap content during run. |
|
484 | Another process does not see the pending nodemap content during run. | |
485 |
|
485 | |||
486 | $ echo qpoasp > a |
|
486 | $ echo qpoasp > a | |
487 | $ hg ci -m a2 \ |
|
487 | $ hg ci -m a2 \ | |
488 | > --config "hooks.pretxnclose=sh \"$RUNTESTDIR/testlib/wait-on-file\" 20 sync-repo-read sync-txn-pending" \ |
|
488 | > --config "hooks.pretxnclose=sh \"$RUNTESTDIR/testlib/wait-on-file\" 20 sync-repo-read sync-txn-pending" \ | |
489 | > --config "hooks.txnclose=touch sync-txn-close" > output.txt 2>&1 & |
|
489 | > --config "hooks.txnclose=touch sync-txn-close" > output.txt 2>&1 & | |
490 |
|
490 | |||
491 | (read the repository while the commit transaction is pending) |
|
491 | (read the repository while the commit transaction is pending) | |
492 |
|
492 | |||
493 | $ sh "$RUNTESTDIR/testlib/wait-on-file" 20 sync-txn-pending && \ |
|
493 | $ sh "$RUNTESTDIR/testlib/wait-on-file" 20 sync-txn-pending && \ | |
494 | > hg debugnodemap --metadata && \ |
|
494 | > hg debugnodemap --metadata && \ | |
495 | > sh "$RUNTESTDIR/testlib/wait-on-file" 20 sync-txn-close sync-repo-read |
|
495 | > sh "$RUNTESTDIR/testlib/wait-on-file" 20 sync-txn-close sync-repo-read | |
496 | uid: ???????? (glob) |
|
496 | uid: ???????? (glob) | |
497 | tip-rev: 5004 |
|
497 | tip-rev: 5004 | |
498 | tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984 |
|
498 | tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984 | |
499 | data-length: 121280 (pure !) |
|
499 | data-length: 121280 (pure !) | |
500 | data-length: 121280 (rust !) |
|
500 | data-length: 121280 (rust !) | |
501 | data-length: 121088 (no-pure no-rust !) |
|
501 | data-length: 121088 (no-pure no-rust !) | |
502 | data-unused: 192 (pure !) |
|
502 | data-unused: 192 (pure !) | |
503 | data-unused: 192 (rust !) |
|
503 | data-unused: 192 (rust !) | |
504 | data-unused: 0 (no-pure no-rust !) |
|
504 | data-unused: 0 (no-pure no-rust !) | |
505 | data-unused: 0.158% (pure !) |
|
505 | data-unused: 0.158% (pure !) | |
506 | data-unused: 0.158% (rust !) |
|
506 | data-unused: 0.158% (rust !) | |
507 | data-unused: 0.000% (no-pure no-rust !) |
|
507 | data-unused: 0.000% (no-pure no-rust !) | |
508 | $ hg debugnodemap --metadata |
|
508 | $ hg debugnodemap --metadata | |
509 | uid: ???????? (glob) |
|
509 | uid: ???????? (glob) | |
510 | tip-rev: 5005 |
|
510 | tip-rev: 5005 | |
511 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
511 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
512 | data-length: 121536 (pure !) |
|
512 | data-length: 121536 (pure !) | |
513 | data-length: 121536 (rust !) |
|
513 | data-length: 121536 (rust !) | |
514 | data-length: 121088 (no-pure no-rust !) |
|
514 | data-length: 121088 (no-pure no-rust !) | |
515 | data-unused: 448 (pure !) |
|
515 | data-unused: 448 (pure !) | |
516 | data-unused: 448 (rust !) |
|
516 | data-unused: 448 (rust !) | |
517 | data-unused: 0 (no-pure no-rust !) |
|
517 | data-unused: 0 (no-pure no-rust !) | |
518 | data-unused: 0.369% (pure !) |
|
518 | data-unused: 0.369% (pure !) | |
519 | data-unused: 0.369% (rust !) |
|
519 | data-unused: 0.369% (rust !) | |
520 | data-unused: 0.000% (no-pure no-rust !) |
|
520 | data-unused: 0.000% (no-pure no-rust !) | |
521 |
|
521 | |||
522 | $ cat output.txt |
|
522 | $ cat output.txt | |
523 |
|
523 | |||
524 | Check that a failing transaction will properly revert the data |
|
524 | Check that a failing transaction will properly revert the data | |
525 |
|
525 | |||
526 | $ echo plakfe > a |
|
526 | $ echo plakfe > a | |
527 | $ f --size --sha256 .hg/store/00changelog-*.nd |
|
527 | $ f --size --sha256 .hg/store/00changelog-*.nd | |
528 | .hg/store/00changelog-????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !) |
|
528 | .hg/store/00changelog-????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !) | |
529 | .hg/store/00changelog-????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !) |
|
529 | .hg/store/00changelog-????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !) | |
530 | .hg/store/00changelog-????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !) |
|
530 | .hg/store/00changelog-????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !) | |
531 | $ hg ci -m a3 --config "extensions.abort=$RUNTESTDIR/testlib/crash_transaction_late.py" |
|
531 | $ hg ci -m a3 --config "extensions.abort=$RUNTESTDIR/testlib/crash_transaction_late.py" | |
532 | transaction abort! |
|
532 | transaction abort! | |
533 | rollback completed |
|
533 | rollback completed | |
534 | abort: This is a late abort |
|
534 | abort: This is a late abort | |
535 | [255] |
|
535 | [255] | |
536 | $ hg debugnodemap --metadata |
|
536 | $ hg debugnodemap --metadata | |
537 | uid: ???????? (glob) |
|
537 | uid: ???????? (glob) | |
538 | tip-rev: 5005 |
|
538 | tip-rev: 5005 | |
539 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
539 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
540 | data-length: 121536 (pure !) |
|
540 | data-length: 121536 (pure !) | |
541 | data-length: 121536 (rust !) |
|
541 | data-length: 121536 (rust !) | |
542 | data-length: 121088 (no-pure no-rust !) |
|
542 | data-length: 121088 (no-pure no-rust !) | |
543 | data-unused: 448 (pure !) |
|
543 | data-unused: 448 (pure !) | |
544 | data-unused: 448 (rust !) |
|
544 | data-unused: 448 (rust !) | |
545 | data-unused: 0 (no-pure no-rust !) |
|
545 | data-unused: 0 (no-pure no-rust !) | |
546 | data-unused: 0.369% (pure !) |
|
546 | data-unused: 0.369% (pure !) | |
547 | data-unused: 0.369% (rust !) |
|
547 | data-unused: 0.369% (rust !) | |
548 | data-unused: 0.000% (no-pure no-rust !) |
|
548 | data-unused: 0.000% (no-pure no-rust !) | |
549 | $ f --size --sha256 .hg/store/00changelog-*.nd |
|
549 | $ f --size --sha256 .hg/store/00changelog-*.nd | |
550 | .hg/store/00changelog-????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !) |
|
550 | .hg/store/00changelog-????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !) | |
551 | .hg/store/00changelog-????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !) |
|
551 | .hg/store/00changelog-????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !) | |
552 | .hg/store/00changelog-????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !) |
|
552 | .hg/store/00changelog-????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !) | |
553 |
|
553 | |||
554 | Check that removing content does not confuse the nodemap |
|
554 | Check that removing content does not confuse the nodemap | |
555 | -------------------------------------------------------- |
|
555 | -------------------------------------------------------- | |
556 |
|
556 | |||
557 | removing data with rollback |
|
557 | removing data with rollback | |
558 |
|
558 | |||
559 | $ echo aso > a |
|
559 | $ echo aso > a | |
560 | $ hg ci -m a4 |
|
560 | $ hg ci -m a4 | |
561 | $ hg rollback |
|
561 | $ hg rollback | |
562 | repository tip rolled back to revision 5005 (undo commit) |
|
562 | repository tip rolled back to revision 5005 (undo commit) | |
563 | working directory now based on revision 5005 |
|
563 | working directory now based on revision 5005 | |
564 | $ hg id -r . |
|
564 | $ hg id -r . | |
565 | 90d5d3ba2fc4 tip |
|
565 | 90d5d3ba2fc4 tip | |
566 |
|
566 | |||
567 | removing data with strip |
|
567 | removing data with strip | |
568 |
|
568 | |||
569 | $ echo aso > a |
|
569 | $ echo aso > a | |
570 | $ hg ci -m a4 |
|
570 | $ hg ci -m a4 | |
571 | $ hg --config extensions.strip= strip -r . --no-backup |
|
571 | $ hg --config extensions.strip= strip -r . --no-backup | |
572 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
572 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
573 | $ hg id -r . --traceback |
|
573 | $ hg id -r . --traceback | |
574 | 90d5d3ba2fc4 tip |
|
574 | 90d5d3ba2fc4 tip | |
575 |
|
575 | |||
576 | (be a good citizen and regenerate the nodemap) |
|
576 | (be a good citizen and regenerate the nodemap) | |
577 | $ hg debugupdatecaches |
|
577 | $ hg debugupdatecaches | |
578 | $ hg debugnodemap --metadata |
|
578 | $ hg debugnodemap --metadata | |
579 | uid: * (glob) |
|
579 | uid: * (glob) | |
580 | tip-rev: 5005 |
|
580 | tip-rev: 5005 | |
581 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
581 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
582 | data-length: 121088 |
|
582 | data-length: 121088 | |
583 | data-unused: 0 |
|
583 | data-unused: 0 | |
584 | data-unused: 0.000% |
|
584 | data-unused: 0.000% | |
585 |
|
585 | |||
586 | Check race condition when multiple process write new data to the repository |
|
586 | Check race condition when multiple process write new data to the repository | |
587 | --------------------------------------------------------------------------- |
|
587 | --------------------------------------------------------------------------- | |
588 |
|
588 | |||
589 | In this test, we check that two writers touching the repositories will not |
|
589 | In this test, we check that two writers touching the repositories will not | |
590 | overwrite each other data. This test is prompted by the existent of issue6554. |
|
590 | overwrite each other data. This test is prompted by the existent of issue6554. | |
591 | Where a writer ended up using and outdated docket to update the repository. See |
|
591 | Where a writer ended up using and outdated docket to update the repository. See | |
592 | the dedicated extension for details on the race windows and read/write schedule |
|
592 | the dedicated extension for details on the race windows and read/write schedule | |
593 | necessary to end up in this situation: testlib/persistent-nodemap-race-ext.py |
|
593 | necessary to end up in this situation: testlib/persistent-nodemap-race-ext.py | |
594 |
|
594 | |||
595 | The issue was initially observed on a server with a high push trafic, but it |
|
595 | The issue was initially observed on a server with a high push trafic, but it | |
596 | can be reproduced using a share and two commiting process which seems simpler. |
|
596 | can be reproduced using a share and two commiting process which seems simpler. | |
597 |
|
597 | |||
598 | The test is Rust only as the other implementation does not use the same |
|
598 | The test is Rust only as the other implementation does not use the same | |
599 | read/write patterns. |
|
599 | read/write patterns. | |
600 |
|
600 | |||
601 | $ cd .. |
|
601 | $ cd .. | |
602 |
|
602 | |||
603 | #if rust |
|
603 | #if rust | |
604 |
|
604 | |||
605 | $ cp -R test-repo race-repo |
|
605 | $ cp -R test-repo race-repo | |
606 | $ hg share race-repo ./other-wc --config format.use-share-safe=yes |
|
606 | $ hg share race-repo ./other-wc --config format.use-share-safe=yes | |
607 | updating working directory |
|
607 | updating working directory | |
608 | 5001 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
608 | 5001 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
609 | $ hg debugformat -R ./race-repo | egrep 'share-safe|persistent-nodemap' |
|
609 | $ hg debugformat -R ./race-repo | egrep 'share-safe|persistent-nodemap' | |
610 | share-safe: yes |
|
610 | share-safe: yes | |
611 | persistent-nodemap: yes |
|
611 | persistent-nodemap: yes | |
612 | $ hg debugformat -R ./other-wc/ | egrep 'share-safe|persistent-nodemap' |
|
612 | $ hg debugformat -R ./other-wc/ | egrep 'share-safe|persistent-nodemap' | |
613 | share-safe: yes |
|
613 | share-safe: yes | |
614 | persistent-nodemap: yes |
|
614 | persistent-nodemap: yes | |
615 | $ hg -R ./other-wc update 'min(head())' |
|
615 | $ hg -R ./other-wc update 'min(head())' | |
616 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
616 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
617 | $ hg -R ./race-repo debugnodemap --metadata |
|
617 | $ hg -R ./race-repo debugnodemap --metadata | |
618 | uid: 43c37dde |
|
618 | uid: 43c37dde | |
619 | tip-rev: 5005 |
|
619 | tip-rev: 5005 | |
620 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
620 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
621 | data-length: 121088 |
|
621 | data-length: 121088 | |
622 | data-unused: 0 |
|
622 | data-unused: 0 | |
623 | data-unused: 0.000% |
|
623 | data-unused: 0.000% | |
624 | $ hg -R ./race-repo log -G -r 'head()' |
|
624 | $ hg -R ./race-repo log -G -r 'head()' | |
625 | @ changeset: 5005:90d5d3ba2fc4 |
|
625 | @ changeset: 5005:90d5d3ba2fc4 | |
626 | | tag: tip |
|
626 | | tag: tip | |
627 | ~ user: test |
|
627 | ~ user: test | |
628 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
628 | date: Thu Jan 01 00:00:00 1970 +0000 | |
629 | summary: a2 |
|
629 | summary: a2 | |
630 |
|
630 | |||
631 | o changeset: 5001:16395c3cf7e2 |
|
631 | o changeset: 5001:16395c3cf7e2 | |
632 | | user: test |
|
632 | | user: test | |
633 | ~ date: Thu Jan 01 00:00:00 1970 +0000 |
|
633 | ~ date: Thu Jan 01 00:00:00 1970 +0000 | |
634 | summary: foo |
|
634 | summary: foo | |
635 |
|
635 | |||
636 | $ hg -R ./other-wc log -G -r 'head()' |
|
636 | $ hg -R ./other-wc log -G -r 'head()' | |
637 | o changeset: 5005:90d5d3ba2fc4 |
|
637 | o changeset: 5005:90d5d3ba2fc4 | |
638 | | tag: tip |
|
638 | | tag: tip | |
639 | ~ user: test |
|
639 | ~ user: test | |
640 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
640 | date: Thu Jan 01 00:00:00 1970 +0000 | |
641 | summary: a2 |
|
641 | summary: a2 | |
642 |
|
642 | |||
643 | @ changeset: 5001:16395c3cf7e2 |
|
643 | @ changeset: 5001:16395c3cf7e2 | |
644 | | user: test |
|
644 | | user: test | |
645 | ~ date: Thu Jan 01 00:00:00 1970 +0000 |
|
645 | ~ date: Thu Jan 01 00:00:00 1970 +0000 | |
646 | summary: foo |
|
646 | summary: foo | |
647 |
|
647 | |||
648 | $ echo left-side-race > race-repo/left-side-race |
|
648 | $ echo left-side-race > race-repo/left-side-race | |
649 | $ hg -R ./race-repo/ add race-repo/left-side-race |
|
649 | $ hg -R ./race-repo/ add race-repo/left-side-race | |
650 |
|
650 | |||
651 | $ echo right-side-race > ./other-wc/right-side-race |
|
651 | $ echo right-side-race > ./other-wc/right-side-race | |
652 | $ hg -R ./other-wc/ add ./other-wc/right-side-race |
|
652 | $ hg -R ./other-wc/ add ./other-wc/right-side-race | |
653 |
|
653 | |||
654 | $ mkdir sync-files |
|
654 | $ mkdir sync-files | |
655 | $ mkdir outputs |
|
655 | $ mkdir outputs | |
656 | $ ( |
|
656 | $ ( | |
657 | > hg -R ./race-repo/ commit -m left-side-commit \ |
|
657 | > hg -R ./race-repo/ commit -m left-side-commit \ | |
658 | > --config "extensions.race=${RUNTESTDIR}/testlib/persistent-nodemap-race-ext.py" \ |
|
658 | > --config "extensions.race=${RUNTESTDIR}/testlib/persistent-nodemap-race-ext.py" \ | |
659 | > --config 'devel.nodemap-race.role=left'; |
|
659 | > --config 'devel.nodemap-race.role=left'; | |
660 | > touch sync-files/left-done |
|
660 | > touch sync-files/left-done | |
661 | > ) > outputs/left.txt 2>&1 & |
|
661 | > ) > outputs/left.txt 2>&1 & | |
662 | $ ( |
|
662 | $ ( | |
663 | > hg -R ./other-wc/ commit -m right-side-commit \ |
|
663 | > hg -R ./other-wc/ commit -m right-side-commit \ | |
664 | > --config "extensions.race=${RUNTESTDIR}/testlib/persistent-nodemap-race-ext.py" \ |
|
664 | > --config "extensions.race=${RUNTESTDIR}/testlib/persistent-nodemap-race-ext.py" \ | |
665 | > --config 'devel.nodemap-race.role=right'; |
|
665 | > --config 'devel.nodemap-race.role=right'; | |
666 | > touch sync-files/right-done |
|
666 | > touch sync-files/right-done | |
667 | > ) > outputs/right.txt 2>&1 & |
|
667 | > ) > outputs/right.txt 2>&1 & | |
668 | $ ( |
|
668 | $ ( | |
669 | > hg -R ./race-repo/ check-nodemap-race \ |
|
669 | > hg -R ./race-repo/ check-nodemap-race \ | |
670 | > --config "extensions.race=${RUNTESTDIR}/testlib/persistent-nodemap-race-ext.py" \ |
|
670 | > --config "extensions.race=${RUNTESTDIR}/testlib/persistent-nodemap-race-ext.py" \ | |
671 | > --config 'devel.nodemap-race.role=reader'; |
|
671 | > --config 'devel.nodemap-race.role=reader'; | |
672 | > touch sync-files/reader-done |
|
672 | > touch sync-files/reader-done | |
673 | > ) > outputs/reader.txt 2>&1 & |
|
673 | > ) > outputs/reader.txt 2>&1 & | |
674 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/left-done |
|
674 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/left-done | |
675 | $ cat outputs/left.txt |
|
675 | $ cat outputs/left.txt | |
676 | docket-details: |
|
676 | docket-details: | |
677 | uid: 43c37dde |
|
677 | uid: 43c37dde | |
678 | actual-tip: 5005 |
|
678 | actual-tip: 5005 | |
679 | tip-rev: 5005 |
|
679 | tip-rev: 5005 | |
680 | data-length: 121088 |
|
680 | data-length: 121088 | |
681 | nodemap-race: left side locked and ready to commit |
|
681 | nodemap-race: left side locked and ready to commit | |
682 | docket-details: |
|
682 | docket-details: | |
683 | uid: 43c37dde |
|
683 | uid: 43c37dde | |
684 | actual-tip: 5005 |
|
684 | actual-tip: 5005 | |
685 | tip-rev: 5005 |
|
685 | tip-rev: 5005 | |
686 | data-length: 121088 |
|
686 | data-length: 121088 | |
687 | finalized changelog write |
|
687 | finalized changelog write | |
688 | persisting changelog nodemap |
|
688 | persisting changelog nodemap | |
689 | new data start at 121088 |
|
689 | new data start at 121088 | |
690 | persisted changelog nodemap |
|
690 | persisted changelog nodemap | |
691 | docket-details: |
|
691 | docket-details: | |
692 | uid: 43c37dde |
|
692 | uid: 43c37dde | |
693 | actual-tip: 5006 |
|
693 | actual-tip: 5006 | |
694 | tip-rev: 5006 |
|
694 | tip-rev: 5006 | |
695 | data-length: 121280 |
|
695 | data-length: 121280 | |
696 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/right-done |
|
696 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/right-done | |
697 | $ cat outputs/right.txt |
|
697 | $ cat outputs/right.txt | |
698 | nodemap-race: right side start of the locking sequence |
|
698 | nodemap-race: right side start of the locking sequence | |
699 | nodemap-race: right side reading changelog |
|
699 | nodemap-race: right side reading changelog | |
700 | nodemap-race: right side reading of changelog is done |
|
700 | nodemap-race: right side reading of changelog is done | |
701 | docket-details: |
|
701 | docket-details: | |
702 | uid: 43c37dde |
|
702 | uid: 43c37dde | |
703 | actual-tip: 5006 |
|
703 | actual-tip: 5006 | |
704 | tip-rev: 5005 |
|
704 | tip-rev: 5005 | |
705 | data-length: 121088 |
|
705 | data-length: 121088 | |
706 | nodemap-race: right side ready to wait for the lock |
|
706 | nodemap-race: right side ready to wait for the lock | |
707 | nodemap-race: right side locked and ready to commit |
|
707 | nodemap-race: right side locked and ready to commit | |
708 | docket-details: |
|
708 | docket-details: | |
709 | uid: 43c37dde |
|
709 | uid: 43c37dde | |
710 | actual-tip: 5006 |
|
710 | actual-tip: 5006 | |
711 | tip-rev: 5006 |
|
711 | tip-rev: 5006 | |
712 | data-length: 121280 |
|
712 | data-length: 121280 | |
713 | right ready to write, waiting for reader |
|
713 | right ready to write, waiting for reader | |
714 | right proceeding with writing its changelog index and nodemap |
|
714 | right proceeding with writing its changelog index and nodemap | |
715 | finalized changelog write |
|
715 | finalized changelog write | |
716 | persisting changelog nodemap |
|
716 | persisting changelog nodemap | |
717 | new data start at 121280 |
|
717 | new data start at 121280 | |
718 | persisted changelog nodemap |
|
718 | persisted changelog nodemap | |
719 | docket-details: |
|
719 | docket-details: | |
720 | uid: 43c37dde |
|
720 | uid: 43c37dde | |
721 | actual-tip: 5007 |
|
721 | actual-tip: 5007 | |
722 | tip-rev: 5007 |
|
722 | tip-rev: 5007 | |
723 | data-length: 121536 |
|
723 | data-length: 121536 | |
724 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/reader-done |
|
724 | $ sh "$RUNTESTDIR"/testlib/wait-on-file 10 sync-files/reader-done | |
725 | $ cat outputs/reader.txt |
|
725 | $ cat outputs/reader.txt | |
726 | reader: reading changelog |
|
726 | reader: reading changelog | |
727 | reader ready to read the changelog, waiting for right |
|
727 | reader ready to read the changelog, waiting for right | |
728 | reader: nodemap docket read |
|
728 | reader: nodemap docket read | |
729 | record-data-length: 121280 |
|
729 | record-data-length: 121280 | |
730 | actual-data-length: 121280 |
|
730 | actual-data-length: 121280 | |
731 | file-actual-length: 121536 |
|
731 | file-actual-length: 121536 | |
732 | reader: changelog read |
|
732 | reader: changelog read | |
733 | docket-details: |
|
733 | docket-details: | |
734 | uid: 43c37dde |
|
734 | uid: 43c37dde | |
735 | actual-tip: 5006 |
|
735 | actual-tip: 5006 | |
736 | tip-rev: 5006 |
|
736 | tip-rev: 5006 | |
737 | data-length: 121280 |
|
737 | data-length: 121280 | |
738 | tip-rev: 5006 |
|
738 | tip-rev: 5006 | |
739 | tip-node: 492901161367 |
|
739 | tip-node: 492901161367 | |
740 | node-rev: 5006 |
|
740 | node-rev: 5006 | |
741 |
|
741 | |||
742 | $ hg -R ./race-repo log -G -r 'head()' |
|
742 | $ hg -R ./race-repo log -G -r 'head()' | |
743 | o changeset: 5007:ac4a2abde241 |
|
743 | o changeset: 5007:ac4a2abde241 | |
744 | | tag: tip |
|
744 | | tag: tip | |
745 | ~ parent: 5001:16395c3cf7e2 |
|
745 | ~ parent: 5001:16395c3cf7e2 | |
746 | user: test |
|
746 | user: test | |
747 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
747 | date: Thu Jan 01 00:00:00 1970 +0000 | |
748 | summary: right-side-commit |
|
748 | summary: right-side-commit | |
749 |
|
749 | |||
750 | @ changeset: 5006:492901161367 |
|
750 | @ changeset: 5006:492901161367 | |
751 | | user: test |
|
751 | | user: test | |
752 | ~ date: Thu Jan 01 00:00:00 1970 +0000 |
|
752 | ~ date: Thu Jan 01 00:00:00 1970 +0000 | |
753 | summary: left-side-commit |
|
753 | summary: left-side-commit | |
754 |
|
754 | |||
755 | $ hg -R ./other-wc log -G -r 'head()' |
|
755 | $ hg -R ./other-wc log -G -r 'head()' | |
756 | @ changeset: 5007:ac4a2abde241 |
|
756 | @ changeset: 5007:ac4a2abde241 | |
757 | | tag: tip |
|
757 | | tag: tip | |
758 | ~ parent: 5001:16395c3cf7e2 |
|
758 | ~ parent: 5001:16395c3cf7e2 | |
759 | user: test |
|
759 | user: test | |
760 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
760 | date: Thu Jan 01 00:00:00 1970 +0000 | |
761 | summary: right-side-commit |
|
761 | summary: right-side-commit | |
762 |
|
762 | |||
763 | o changeset: 5006:492901161367 |
|
763 | o changeset: 5006:492901161367 | |
764 | | user: test |
|
764 | | user: test | |
765 | ~ date: Thu Jan 01 00:00:00 1970 +0000 |
|
765 | ~ date: Thu Jan 01 00:00:00 1970 +0000 | |
766 | summary: left-side-commit |
|
766 | summary: left-side-commit | |
767 |
|
767 | |||
768 | #endif |
|
768 | #endif | |
769 |
|
769 | |||
770 | Test upgrade / downgrade |
|
770 | Test upgrade / downgrade | |
771 | ======================== |
|
771 | ======================== | |
772 |
|
772 | |||
773 | $ cd ./test-repo/ |
|
773 | $ cd ./test-repo/ | |
774 |
|
774 | |||
775 | downgrading |
|
775 | downgrading | |
776 |
|
776 | |||
777 | $ cat << EOF >> .hg/hgrc |
|
777 | $ cat << EOF >> .hg/hgrc | |
778 | > [format] |
|
778 | > [format] | |
779 | > use-persistent-nodemap=no |
|
779 | > use-persistent-nodemap=no | |
780 | > EOF |
|
780 | > EOF | |
781 | $ hg debugformat -v |
|
781 | $ hg debugformat -v | |
782 | format-variant repo config default |
|
782 | format-variant repo config default | |
783 | fncache: yes yes yes |
|
783 | fncache: yes yes yes | |
784 | dirstate-v2: no no no |
|
784 | dirstate-v2: no no no | |
785 | dotencode: yes yes yes |
|
785 | dotencode: yes yes yes | |
786 | generaldelta: yes yes yes |
|
786 | generaldelta: yes yes yes | |
787 | share-safe: yes yes no |
|
787 | share-safe: yes yes no | |
788 | sparserevlog: yes yes yes |
|
788 | sparserevlog: yes yes yes | |
789 | persistent-nodemap: yes no no |
|
789 | persistent-nodemap: yes no no | |
790 | copies-sdc: no no no |
|
790 | copies-sdc: no no no | |
791 | revlog-v2: no no no |
|
791 | revlog-v2: no no no | |
792 | changelog-v2: no no no |
|
792 | changelog-v2: no no no | |
793 | plain-cl-delta: yes yes yes |
|
793 | plain-cl-delta: yes yes yes | |
794 | compression: zlib zlib zlib (no-zstd !) |
|
794 | compression: zlib zlib zlib (no-zstd !) | |
795 | compression: zstd zstd zstd (zstd !) |
|
795 | compression: zstd zstd zstd (zstd !) | |
796 | compression-level: default default default |
|
796 | compression-level: default default default | |
797 | $ hg debugupgraderepo --run --no-backup --quiet |
|
797 | $ hg debugupgraderepo --run --no-backup --quiet | |
798 | upgrade will perform the following actions: |
|
798 | upgrade will perform the following actions: | |
799 |
|
799 | |||
800 | requirements |
|
800 | requirements | |
801 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) |
|
801 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | |
802 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) |
|
802 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | |
803 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) |
|
803 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | |
804 | removed: persistent-nodemap |
|
804 | removed: persistent-nodemap | |
805 |
|
805 | |||
806 | processed revlogs: |
|
806 | processed revlogs: | |
807 | - all-filelogs |
|
807 | - all-filelogs | |
808 | - changelog |
|
808 | - changelog | |
809 | - manifest |
|
809 | - manifest | |
810 |
|
810 | |||
811 | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
|
811 | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | |
812 | 00changelog-*.nd (glob) |
|
812 | 00changelog-*.nd (glob) | |
813 | 00manifest-*.nd (glob) |
|
813 | 00manifest-*.nd (glob) | |
814 | undo.backup.00changelog.n |
|
814 | undo.backup.00changelog.n | |
815 | undo.backup.00manifest.n |
|
815 | undo.backup.00manifest.n | |
816 | $ hg debugnodemap --metadata |
|
816 | $ hg debugnodemap --metadata | |
817 |
|
817 | |||
818 |
|
818 | |||
819 | upgrading |
|
819 | upgrading | |
820 |
|
820 | |||
821 | $ cat << EOF >> .hg/hgrc |
|
821 | $ cat << EOF >> .hg/hgrc | |
822 | > [format] |
|
822 | > [format] | |
823 | > use-persistent-nodemap=yes |
|
823 | > use-persistent-nodemap=yes | |
824 | > EOF |
|
824 | > EOF | |
825 | $ hg debugformat -v |
|
825 | $ hg debugformat -v | |
826 | format-variant repo config default |
|
826 | format-variant repo config default | |
827 | fncache: yes yes yes |
|
827 | fncache: yes yes yes | |
828 | dirstate-v2: no no no |
|
828 | dirstate-v2: no no no | |
829 | dotencode: yes yes yes |
|
829 | dotencode: yes yes yes | |
830 | generaldelta: yes yes yes |
|
830 | generaldelta: yes yes yes | |
831 | share-safe: yes yes no |
|
831 | share-safe: yes yes no | |
832 | sparserevlog: yes yes yes |
|
832 | sparserevlog: yes yes yes | |
833 | persistent-nodemap: no yes no |
|
833 | persistent-nodemap: no yes no | |
834 | copies-sdc: no no no |
|
834 | copies-sdc: no no no | |
835 | revlog-v2: no no no |
|
835 | revlog-v2: no no no | |
836 | changelog-v2: no no no |
|
836 | changelog-v2: no no no | |
837 | plain-cl-delta: yes yes yes |
|
837 | plain-cl-delta: yes yes yes | |
838 | compression: zlib zlib zlib (no-zstd !) |
|
838 | compression: zlib zlib zlib (no-zstd !) | |
839 | compression: zstd zstd zstd (zstd !) |
|
839 | compression: zstd zstd zstd (zstd !) | |
840 | compression-level: default default default |
|
840 | compression-level: default default default | |
841 | $ hg debugupgraderepo --run --no-backup --quiet |
|
841 | $ hg debugupgraderepo --run --no-backup --quiet | |
842 | upgrade will perform the following actions: |
|
842 | upgrade will perform the following actions: | |
843 |
|
843 | |||
844 | requirements |
|
844 | requirements | |
845 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) |
|
845 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | |
846 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) |
|
846 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | |
847 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) |
|
847 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | |
848 | added: persistent-nodemap |
|
848 | added: persistent-nodemap | |
849 |
|
849 | |||
850 | processed revlogs: |
|
850 | processed revlogs: | |
851 | - all-filelogs |
|
851 | - all-filelogs | |
852 | - changelog |
|
852 | - changelog | |
853 | - manifest |
|
853 | - manifest | |
854 |
|
854 | |||
855 | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
|
855 | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | |
856 | 00changelog-*.nd (glob) |
|
856 | 00changelog-*.nd (glob) | |
857 | 00changelog.n |
|
857 | 00changelog.n | |
858 | 00manifest-*.nd (glob) |
|
858 | 00manifest-*.nd (glob) | |
859 | 00manifest.n |
|
859 | 00manifest.n | |
860 | undo.backup.00changelog.n |
|
860 | undo.backup.00changelog.n | |
861 | undo.backup.00manifest.n |
|
861 | undo.backup.00manifest.n | |
862 |
|
862 | |||
863 | $ hg debugnodemap --metadata |
|
863 | $ hg debugnodemap --metadata | |
864 | uid: * (glob) |
|
864 | uid: * (glob) | |
865 | tip-rev: 5005 |
|
865 | tip-rev: 5005 | |
866 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
866 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
867 | data-length: 121088 |
|
867 | data-length: 121088 | |
868 | data-unused: 0 |
|
868 | data-unused: 0 | |
869 | data-unused: 0.000% |
|
869 | data-unused: 0.000% | |
870 |
|
870 | |||
871 | Running unrelated upgrade |
|
871 | Running unrelated upgrade | |
872 |
|
872 | |||
873 | $ hg debugupgraderepo --run --no-backup --quiet --optimize re-delta-all |
|
873 | $ hg debugupgraderepo --run --no-backup --quiet --optimize re-delta-all | |
874 | upgrade will perform the following actions: |
|
874 | upgrade will perform the following actions: | |
875 |
|
875 | |||
876 | requirements |
|
876 | requirements | |
877 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) |
|
877 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | |
878 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) |
|
878 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | |
879 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) |
|
879 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | |
880 |
|
880 | |||
881 | optimisations: re-delta-all |
|
881 | optimisations: re-delta-all | |
882 |
|
882 | |||
883 | processed revlogs: |
|
883 | processed revlogs: | |
884 | - all-filelogs |
|
884 | - all-filelogs | |
885 | - changelog |
|
885 | - changelog | |
886 | - manifest |
|
886 | - manifest | |
887 |
|
887 | |||
888 | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
|
888 | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | |
889 | 00changelog-*.nd (glob) |
|
889 | 00changelog-*.nd (glob) | |
890 | 00changelog.n |
|
890 | 00changelog.n | |
891 | 00manifest-*.nd (glob) |
|
891 | 00manifest-*.nd (glob) | |
892 | 00manifest.n |
|
892 | 00manifest.n | |
893 |
|
893 | |||
894 | $ hg debugnodemap --metadata |
|
894 | $ hg debugnodemap --metadata | |
895 | uid: * (glob) |
|
895 | uid: * (glob) | |
896 | tip-rev: 5005 |
|
896 | tip-rev: 5005 | |
897 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
897 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
898 | data-length: 121088 |
|
898 | data-length: 121088 | |
899 | data-unused: 0 |
|
899 | data-unused: 0 | |
900 | data-unused: 0.000% |
|
900 | data-unused: 0.000% | |
901 |
|
901 | |||
902 | Persistent nodemap and local/streaming clone |
|
902 | Persistent nodemap and local/streaming clone | |
903 | ============================================ |
|
903 | ============================================ | |
904 |
|
904 | |||
905 | $ cd .. |
|
905 | $ cd .. | |
906 |
|
906 | |||
907 | standard clone |
|
907 | standard clone | |
908 | -------------- |
|
908 | -------------- | |
909 |
|
909 | |||
910 | The persistent nodemap should exist after a streaming clone |
|
910 | The persistent nodemap should exist after a streaming clone | |
911 |
|
911 | |||
912 | $ hg clone --pull --quiet -U test-repo standard-clone |
|
912 | $ hg clone --pull --quiet -U test-repo standard-clone | |
913 | $ ls -1 standard-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
|
913 | $ ls -1 standard-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | |
914 | 00changelog-*.nd (glob) |
|
914 | 00changelog-*.nd (glob) | |
915 | 00changelog.n |
|
915 | 00changelog.n | |
916 | 00manifest-*.nd (glob) |
|
916 | 00manifest-*.nd (glob) | |
917 | 00manifest.n |
|
917 | 00manifest.n | |
918 | $ hg -R standard-clone debugnodemap --metadata |
|
918 | $ hg -R standard-clone debugnodemap --metadata | |
919 | uid: * (glob) |
|
919 | uid: * (glob) | |
920 | tip-rev: 5005 |
|
920 | tip-rev: 5005 | |
921 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
921 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
922 | data-length: 121088 |
|
922 | data-length: 121088 | |
923 | data-unused: 0 |
|
923 | data-unused: 0 | |
924 | data-unused: 0.000% |
|
924 | data-unused: 0.000% | |
925 |
|
925 | |||
926 |
|
926 | |||
927 | local clone |
|
927 | local clone | |
928 | ------------ |
|
928 | ------------ | |
929 |
|
929 | |||
930 | The persistent nodemap should exist after a streaming clone |
|
930 | The persistent nodemap should exist after a streaming clone | |
931 |
|
931 | |||
932 | $ hg clone -U test-repo local-clone |
|
932 | $ hg clone -U test-repo local-clone | |
933 | $ ls -1 local-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
|
933 | $ ls -1 local-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | |
934 | 00changelog-*.nd (glob) |
|
934 | 00changelog-*.nd (glob) | |
935 | 00changelog.n |
|
935 | 00changelog.n | |
936 | 00manifest-*.nd (glob) |
|
936 | 00manifest-*.nd (glob) | |
937 | 00manifest.n |
|
937 | 00manifest.n | |
938 | $ hg -R local-clone debugnodemap --metadata |
|
938 | $ hg -R local-clone debugnodemap --metadata | |
939 | uid: * (glob) |
|
939 | uid: * (glob) | |
940 | tip-rev: 5005 |
|
940 | tip-rev: 5005 | |
941 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
941 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
942 | data-length: 121088 |
|
942 | data-length: 121088 | |
943 | data-unused: 0 |
|
943 | data-unused: 0 | |
944 | data-unused: 0.000% |
|
944 | data-unused: 0.000% | |
945 |
|
945 | |||
946 | Test various corruption case |
|
946 | Test various corruption case | |
947 | ============================ |
|
947 | ============================ | |
948 |
|
948 | |||
949 | Missing datafile |
|
949 | Missing datafile | |
950 | ---------------- |
|
950 | ---------------- | |
951 |
|
951 | |||
952 | Test behavior with a missing datafile |
|
952 | Test behavior with a missing datafile | |
953 |
|
953 | |||
954 | $ hg clone --quiet --pull test-repo corruption-test-repo |
|
954 | $ hg clone --quiet --pull test-repo corruption-test-repo | |
955 | $ ls -1 corruption-test-repo/.hg/store/00changelog* |
|
955 | $ ls -1 corruption-test-repo/.hg/store/00changelog* | |
956 | corruption-test-repo/.hg/store/00changelog-*.nd (glob) |
|
956 | corruption-test-repo/.hg/store/00changelog-*.nd (glob) | |
957 | corruption-test-repo/.hg/store/00changelog.d |
|
957 | corruption-test-repo/.hg/store/00changelog.d | |
958 | corruption-test-repo/.hg/store/00changelog.i |
|
958 | corruption-test-repo/.hg/store/00changelog.i | |
959 | corruption-test-repo/.hg/store/00changelog.n |
|
959 | corruption-test-repo/.hg/store/00changelog.n | |
960 | $ rm corruption-test-repo/.hg/store/00changelog*.nd |
|
960 | $ rm corruption-test-repo/.hg/store/00changelog*.nd | |
961 | $ hg log -R corruption-test-repo -r . |
|
961 | $ hg log -R corruption-test-repo -r . | |
962 | changeset: 5005:90d5d3ba2fc4 |
|
962 | changeset: 5005:90d5d3ba2fc4 | |
963 | tag: tip |
|
963 | tag: tip | |
964 | user: test |
|
964 | user: test | |
965 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
965 | date: Thu Jan 01 00:00:00 1970 +0000 | |
966 | summary: a2 |
|
966 | summary: a2 | |
967 |
|
967 | |||
968 | $ ls -1 corruption-test-repo/.hg/store/00changelog* |
|
968 | $ ls -1 corruption-test-repo/.hg/store/00changelog* | |
969 | corruption-test-repo/.hg/store/00changelog.d |
|
969 | corruption-test-repo/.hg/store/00changelog.d | |
970 | corruption-test-repo/.hg/store/00changelog.i |
|
970 | corruption-test-repo/.hg/store/00changelog.i | |
971 | corruption-test-repo/.hg/store/00changelog.n |
|
971 | corruption-test-repo/.hg/store/00changelog.n | |
972 |
|
972 | |||
973 | Truncated data file |
|
973 | Truncated data file | |
974 | ------------------- |
|
974 | ------------------- | |
975 |
|
975 | |||
976 | Test behavior with a too short datafile |
|
976 | Test behavior with a too short datafile | |
977 |
|
977 | |||
978 | rebuild the missing data |
|
978 | rebuild the missing data | |
979 | $ hg -R corruption-test-repo debugupdatecache |
|
979 | $ hg -R corruption-test-repo debugupdatecache | |
980 | $ ls -1 corruption-test-repo/.hg/store/00changelog* |
|
980 | $ ls -1 corruption-test-repo/.hg/store/00changelog* | |
981 | corruption-test-repo/.hg/store/00changelog-*.nd (glob) |
|
981 | corruption-test-repo/.hg/store/00changelog-*.nd (glob) | |
982 | corruption-test-repo/.hg/store/00changelog.d |
|
982 | corruption-test-repo/.hg/store/00changelog.d | |
983 | corruption-test-repo/.hg/store/00changelog.i |
|
983 | corruption-test-repo/.hg/store/00changelog.i | |
984 | corruption-test-repo/.hg/store/00changelog.n |
|
984 | corruption-test-repo/.hg/store/00changelog.n | |
985 |
|
985 | |||
986 | truncate the file |
|
986 | truncate the file | |
987 |
|
987 | |||
988 | $ datafilepath=`ls corruption-test-repo/.hg/store/00changelog*.nd` |
|
988 | $ datafilepath=`ls corruption-test-repo/.hg/store/00changelog*.nd` | |
989 | $ f -s $datafilepath |
|
989 | $ f -s $datafilepath | |
990 | corruption-test-repo/.hg/store/00changelog-*.nd: size=121088 (glob) |
|
990 | corruption-test-repo/.hg/store/00changelog-*.nd: size=121088 (glob) | |
991 |
$ dd if=$datafilepath bs=1000 count=10 of=$datafilepath-tmp |
|
991 | $ dd if=$datafilepath bs=1000 count=10 of=$datafilepath-tmp | |
992 | 10+0 records in |
|
992 | 10+0 records in | |
993 | 10+0 records out |
|
993 | 10+0 records out | |
|
994 | * bytes * (glob) | |||
994 | $ mv $datafilepath-tmp $datafilepath |
|
995 | $ mv $datafilepath-tmp $datafilepath | |
995 | $ f -s $datafilepath |
|
996 | $ f -s $datafilepath | |
996 | corruption-test-repo/.hg/store/00changelog-*.nd: size=10000 (glob) |
|
997 | corruption-test-repo/.hg/store/00changelog-*.nd: size=10000 (glob) | |
997 |
|
998 | |||
998 | Check that Mercurial reaction to this event |
|
999 | Check that Mercurial reaction to this event | |
999 |
|
1000 | |||
1000 | $ hg -R corruption-test-repo log -r . --traceback |
|
1001 | $ hg -R corruption-test-repo log -r . --traceback | |
1001 | changeset: 5005:90d5d3ba2fc4 |
|
1002 | changeset: 5005:90d5d3ba2fc4 | |
1002 | tag: tip |
|
1003 | tag: tip | |
1003 | user: test |
|
1004 | user: test | |
1004 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1005 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1005 | summary: a2 |
|
1006 | summary: a2 | |
1006 |
|
1007 | |||
1007 |
|
1008 | |||
1008 |
|
1009 | |||
1009 | stream clone |
|
1010 | stream clone | |
1010 | ============ |
|
1011 | ============ | |
1011 |
|
1012 | |||
1012 | The persistent nodemap should exist after a streaming clone |
|
1013 | The persistent nodemap should exist after a streaming clone | |
1013 |
|
1014 | |||
1014 | Simple case |
|
1015 | Simple case | |
1015 | ----------- |
|
1016 | ----------- | |
1016 |
|
1017 | |||
1017 | No race condition |
|
1018 | No race condition | |
1018 |
|
1019 | |||
1019 | $ hg clone -U --stream ssh://user@dummy/test-repo stream-clone --debug | egrep '00(changelog|manifest)' |
|
1020 | $ hg clone -U --stream ssh://user@dummy/test-repo stream-clone --debug | egrep '00(changelog|manifest)' | |
1020 | adding [s] 00manifest.n (62 bytes) |
|
1021 | adding [s] 00manifest.n (62 bytes) | |
1021 | adding [s] 00manifest-*.nd (118 KB) (glob) |
|
1022 | adding [s] 00manifest-*.nd (118 KB) (glob) | |
1022 | adding [s] 00changelog.n (62 bytes) |
|
1023 | adding [s] 00changelog.n (62 bytes) | |
1023 | adding [s] 00changelog-*.nd (118 KB) (glob) |
|
1024 | adding [s] 00changelog-*.nd (118 KB) (glob) | |
1024 | adding [s] 00manifest.d (452 KB) (no-zstd !) |
|
1025 | adding [s] 00manifest.d (452 KB) (no-zstd !) | |
1025 | adding [s] 00manifest.d (491 KB) (zstd !) |
|
1026 | adding [s] 00manifest.d (491 KB) (zstd !) | |
1026 | adding [s] 00changelog.d (360 KB) (no-zstd !) |
|
1027 | adding [s] 00changelog.d (360 KB) (no-zstd !) | |
1027 | adding [s] 00changelog.d (368 KB) (zstd !) |
|
1028 | adding [s] 00changelog.d (368 KB) (zstd !) | |
1028 | adding [s] 00manifest.i (313 KB) |
|
1029 | adding [s] 00manifest.i (313 KB) | |
1029 | adding [s] 00changelog.i (313 KB) |
|
1030 | adding [s] 00changelog.i (313 KB) | |
1030 | $ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' |
|
1031 | $ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | |
1031 | 00changelog-*.nd (glob) |
|
1032 | 00changelog-*.nd (glob) | |
1032 | 00changelog.n |
|
1033 | 00changelog.n | |
1033 | 00manifest-*.nd (glob) |
|
1034 | 00manifest-*.nd (glob) | |
1034 | 00manifest.n |
|
1035 | 00manifest.n | |
1035 | $ hg -R stream-clone debugnodemap --metadata |
|
1036 | $ hg -R stream-clone debugnodemap --metadata | |
1036 | uid: * (glob) |
|
1037 | uid: * (glob) | |
1037 | tip-rev: 5005 |
|
1038 | tip-rev: 5005 | |
1038 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
1039 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
1039 | data-length: 121088 |
|
1040 | data-length: 121088 | |
1040 | data-unused: 0 |
|
1041 | data-unused: 0 | |
1041 | data-unused: 0.000% |
|
1042 | data-unused: 0.000% | |
1042 |
|
1043 | |||
1043 | new data appened |
|
1044 | new data appened | |
1044 | ----------------- |
|
1045 | ----------------- | |
1045 |
|
1046 | |||
1046 | Other commit happening on the server during the stream clone |
|
1047 | Other commit happening on the server during the stream clone | |
1047 |
|
1048 | |||
1048 | setup the step-by-step stream cloning |
|
1049 | setup the step-by-step stream cloning | |
1049 |
|
1050 | |||
1050 | $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1" |
|
1051 | $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1" | |
1051 | $ export HG_TEST_STREAM_WALKED_FILE_1 |
|
1052 | $ export HG_TEST_STREAM_WALKED_FILE_1 | |
1052 | $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2" |
|
1053 | $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2" | |
1053 | $ export HG_TEST_STREAM_WALKED_FILE_2 |
|
1054 | $ export HG_TEST_STREAM_WALKED_FILE_2 | |
1054 | $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3" |
|
1055 | $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3" | |
1055 | $ export HG_TEST_STREAM_WALKED_FILE_3 |
|
1056 | $ export HG_TEST_STREAM_WALKED_FILE_3 | |
1056 | $ cat << EOF >> test-repo/.hg/hgrc |
|
1057 | $ cat << EOF >> test-repo/.hg/hgrc | |
1057 | > [extensions] |
|
1058 | > [extensions] | |
1058 | > steps=$RUNTESTDIR/testlib/ext-stream-clone-steps.py |
|
1059 | > steps=$RUNTESTDIR/testlib/ext-stream-clone-steps.py | |
1059 | > EOF |
|
1060 | > EOF | |
1060 |
|
1061 | |||
1061 | Check and record file state beforehand |
|
1062 | Check and record file state beforehand | |
1062 |
|
1063 | |||
1063 | $ f --size test-repo/.hg/store/00changelog* |
|
1064 | $ f --size test-repo/.hg/store/00changelog* | |
1064 | test-repo/.hg/store/00changelog-*.nd: size=121088 (glob) |
|
1065 | test-repo/.hg/store/00changelog-*.nd: size=121088 (glob) | |
1065 | test-repo/.hg/store/00changelog.d: size=376891 (zstd !) |
|
1066 | test-repo/.hg/store/00changelog.d: size=376891 (zstd !) | |
1066 | test-repo/.hg/store/00changelog.d: size=368890 (no-zstd !) |
|
1067 | test-repo/.hg/store/00changelog.d: size=368890 (no-zstd !) | |
1067 | test-repo/.hg/store/00changelog.i: size=320384 |
|
1068 | test-repo/.hg/store/00changelog.i: size=320384 | |
1068 | test-repo/.hg/store/00changelog.n: size=62 |
|
1069 | test-repo/.hg/store/00changelog.n: size=62 | |
1069 | $ hg -R test-repo debugnodemap --metadata | tee server-metadata.txt |
|
1070 | $ hg -R test-repo debugnodemap --metadata | tee server-metadata.txt | |
1070 | uid: * (glob) |
|
1071 | uid: * (glob) | |
1071 | tip-rev: 5005 |
|
1072 | tip-rev: 5005 | |
1072 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
1073 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
1073 | data-length: 121088 |
|
1074 | data-length: 121088 | |
1074 | data-unused: 0 |
|
1075 | data-unused: 0 | |
1075 | data-unused: 0.000% |
|
1076 | data-unused: 0.000% | |
1076 |
|
1077 | |||
1077 | Prepare a commit |
|
1078 | Prepare a commit | |
1078 |
|
1079 | |||
1079 | $ echo foo >> test-repo/foo |
|
1080 | $ echo foo >> test-repo/foo | |
1080 | $ hg -R test-repo/ add test-repo/foo |
|
1081 | $ hg -R test-repo/ add test-repo/foo | |
1081 |
|
1082 | |||
1082 | Do a mix of clone and commit at the same time so that the file listed on disk differ at actual transfer time. |
|
1083 | Do a mix of clone and commit at the same time so that the file listed on disk differ at actual transfer time. | |
1083 |
|
1084 | |||
1084 | $ (hg clone -U --stream ssh://user@dummy/test-repo stream-clone-race-1 --debug 2>> clone-output | egrep '00(changelog|manifest)' >> clone-output; touch $HG_TEST_STREAM_WALKED_FILE_3) & |
|
1085 | $ (hg clone -U --stream ssh://user@dummy/test-repo stream-clone-race-1 --debug 2>> clone-output | egrep '00(changelog|manifest)' >> clone-output; touch $HG_TEST_STREAM_WALKED_FILE_3) & | |
1085 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
|
1086 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 | |
1086 | $ hg -R test-repo/ commit -m foo |
|
1087 | $ hg -R test-repo/ commit -m foo | |
1087 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
|
1088 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 | |
1088 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
|
1089 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 | |
1089 | $ cat clone-output |
|
1090 | $ cat clone-output | |
1090 | adding [s] 00manifest.n (62 bytes) |
|
1091 | adding [s] 00manifest.n (62 bytes) | |
1091 | adding [s] 00manifest-*.nd (118 KB) (glob) |
|
1092 | adding [s] 00manifest-*.nd (118 KB) (glob) | |
1092 | adding [s] 00changelog.n (62 bytes) |
|
1093 | adding [s] 00changelog.n (62 bytes) | |
1093 | adding [s] 00changelog-*.nd (118 KB) (glob) |
|
1094 | adding [s] 00changelog-*.nd (118 KB) (glob) | |
1094 | adding [s] 00manifest.d (452 KB) (no-zstd !) |
|
1095 | adding [s] 00manifest.d (452 KB) (no-zstd !) | |
1095 | adding [s] 00manifest.d (491 KB) (zstd !) |
|
1096 | adding [s] 00manifest.d (491 KB) (zstd !) | |
1096 | adding [s] 00changelog.d (360 KB) (no-zstd !) |
|
1097 | adding [s] 00changelog.d (360 KB) (no-zstd !) | |
1097 | adding [s] 00changelog.d (368 KB) (zstd !) |
|
1098 | adding [s] 00changelog.d (368 KB) (zstd !) | |
1098 | adding [s] 00manifest.i (313 KB) |
|
1099 | adding [s] 00manifest.i (313 KB) | |
1099 | adding [s] 00changelog.i (313 KB) |
|
1100 | adding [s] 00changelog.i (313 KB) | |
1100 |
|
1101 | |||
1101 | Check the result state |
|
1102 | Check the result state | |
1102 |
|
1103 | |||
1103 | $ f --size stream-clone-race-1/.hg/store/00changelog* |
|
1104 | $ f --size stream-clone-race-1/.hg/store/00changelog* | |
1104 | stream-clone-race-1/.hg/store/00changelog-*.nd: size=121088 (glob) |
|
1105 | stream-clone-race-1/.hg/store/00changelog-*.nd: size=121088 (glob) | |
1105 | stream-clone-race-1/.hg/store/00changelog.d: size=368890 (no-zstd !) |
|
1106 | stream-clone-race-1/.hg/store/00changelog.d: size=368890 (no-zstd !) | |
1106 | stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd !) |
|
1107 | stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd !) | |
1107 | stream-clone-race-1/.hg/store/00changelog.i: size=320384 |
|
1108 | stream-clone-race-1/.hg/store/00changelog.i: size=320384 | |
1108 | stream-clone-race-1/.hg/store/00changelog.n: size=62 |
|
1109 | stream-clone-race-1/.hg/store/00changelog.n: size=62 | |
1109 |
|
1110 | |||
1110 | $ hg -R stream-clone-race-1 debugnodemap --metadata | tee client-metadata.txt |
|
1111 | $ hg -R stream-clone-race-1 debugnodemap --metadata | tee client-metadata.txt | |
1111 | uid: * (glob) |
|
1112 | uid: * (glob) | |
1112 | tip-rev: 5005 |
|
1113 | tip-rev: 5005 | |
1113 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
1114 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
1114 | data-length: 121088 |
|
1115 | data-length: 121088 | |
1115 | data-unused: 0 |
|
1116 | data-unused: 0 | |
1116 | data-unused: 0.000% |
|
1117 | data-unused: 0.000% | |
1117 |
|
1118 | |||
1118 | We get a usable nodemap, so no rewrite would be needed and the metadata should be identical |
|
1119 | We get a usable nodemap, so no rewrite would be needed and the metadata should be identical | |
1119 | (ie: the following diff should be empty) |
|
1120 | (ie: the following diff should be empty) | |
1120 |
|
1121 | |||
1121 | 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". |
|
1122 | 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". | |
1122 |
|
1123 | |||
1123 | #if no-rust no-pure |
|
1124 | #if no-rust no-pure | |
1124 | $ diff -u server-metadata.txt client-metadata.txt |
|
1125 | $ diff -u server-metadata.txt client-metadata.txt | |
1125 | --- server-metadata.txt * (glob) |
|
1126 | --- server-metadata.txt * (glob) | |
1126 | +++ client-metadata.txt * (glob) |
|
1127 | +++ client-metadata.txt * (glob) | |
1127 | @@ -1,4 +1,4 @@ |
|
1128 | @@ -1,4 +1,4 @@ | |
1128 | -uid: * (glob) |
|
1129 | -uid: * (glob) | |
1129 | +uid: * (glob) |
|
1130 | +uid: * (glob) | |
1130 | tip-rev: 5005 |
|
1131 | tip-rev: 5005 | |
1131 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe |
|
1132 | tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe | |
1132 | data-length: 121088 |
|
1133 | data-length: 121088 | |
1133 | [1] |
|
1134 | [1] | |
1134 | #else |
|
1135 | #else | |
1135 | $ diff -u server-metadata.txt client-metadata.txt |
|
1136 | $ diff -u server-metadata.txt client-metadata.txt | |
1136 | #endif |
|
1137 | #endif | |
1137 |
|
1138 | |||
1138 |
|
1139 | |||
1139 | Clean up after the test. |
|
1140 | Clean up after the test. | |
1140 |
|
1141 | |||
1141 | $ rm -f "$HG_TEST_STREAM_WALKED_FILE_1" |
|
1142 | $ rm -f "$HG_TEST_STREAM_WALKED_FILE_1" | |
1142 | $ rm -f "$HG_TEST_STREAM_WALKED_FILE_2" |
|
1143 | $ rm -f "$HG_TEST_STREAM_WALKED_FILE_2" | |
1143 | $ rm -f "$HG_TEST_STREAM_WALKED_FILE_3" |
|
1144 | $ rm -f "$HG_TEST_STREAM_WALKED_FILE_3" | |
1144 |
|
1145 | |||
1145 | full regeneration |
|
1146 | full regeneration | |
1146 | ----------------- |
|
1147 | ----------------- | |
1147 |
|
1148 | |||
1148 | A full nodemap is generated |
|
1149 | A full nodemap is generated | |
1149 |
|
1150 | |||
1150 | (ideally this test would append enough data to make sure the nodemap data file |
|
1151 | (ideally this test would append enough data to make sure the nodemap data file | |
1151 | get changed, however to make thing simpler we will force the regeneration for |
|
1152 | get changed, however to make thing simpler we will force the regeneration for | |
1152 | this test. |
|
1153 | this test. | |
1153 |
|
1154 | |||
1154 | Check the initial state |
|
1155 | Check the initial state | |
1155 |
|
1156 | |||
1156 | $ f --size test-repo/.hg/store/00changelog* |
|
1157 | $ f --size test-repo/.hg/store/00changelog* | |
1157 | test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !) |
|
1158 | test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !) | |
1158 | test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !) |
|
1159 | test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !) | |
1159 | test-repo/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !) |
|
1160 | test-repo/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !) | |
1160 | test-repo/.hg/store/00changelog.d: size=376950 (zstd !) |
|
1161 | test-repo/.hg/store/00changelog.d: size=376950 (zstd !) | |
1161 | test-repo/.hg/store/00changelog.d: size=368949 (no-zstd !) |
|
1162 | test-repo/.hg/store/00changelog.d: size=368949 (no-zstd !) | |
1162 | test-repo/.hg/store/00changelog.i: size=320448 |
|
1163 | test-repo/.hg/store/00changelog.i: size=320448 | |
1163 | test-repo/.hg/store/00changelog.n: size=62 |
|
1164 | test-repo/.hg/store/00changelog.n: size=62 | |
1164 | $ hg -R test-repo debugnodemap --metadata | tee server-metadata-2.txt |
|
1165 | $ hg -R test-repo debugnodemap --metadata | tee server-metadata-2.txt | |
1165 | uid: * (glob) |
|
1166 | uid: * (glob) | |
1166 | tip-rev: 5006 |
|
1167 | tip-rev: 5006 | |
1167 | tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b |
|
1168 | tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b | |
1168 | data-length: 121344 (rust !) |
|
1169 | data-length: 121344 (rust !) | |
1169 | data-length: 121344 (pure !) |
|
1170 | data-length: 121344 (pure !) | |
1170 | data-length: 121152 (no-rust no-pure !) |
|
1171 | data-length: 121152 (no-rust no-pure !) | |
1171 | data-unused: 192 (rust !) |
|
1172 | data-unused: 192 (rust !) | |
1172 | data-unused: 192 (pure !) |
|
1173 | data-unused: 192 (pure !) | |
1173 | data-unused: 0 (no-rust no-pure !) |
|
1174 | data-unused: 0 (no-rust no-pure !) | |
1174 | data-unused: 0.158% (rust !) |
|
1175 | data-unused: 0.158% (rust !) | |
1175 | data-unused: 0.158% (pure !) |
|
1176 | data-unused: 0.158% (pure !) | |
1176 | data-unused: 0.000% (no-rust no-pure !) |
|
1177 | data-unused: 0.000% (no-rust no-pure !) | |
1177 |
|
1178 | |||
1178 | Performe the mix of clone and full refresh of the nodemap, so that the files |
|
1179 | Performe the mix of clone and full refresh of the nodemap, so that the files | |
1179 | (and filenames) are different between listing time and actual transfer time. |
|
1180 | (and filenames) are different between listing time and actual transfer time. | |
1180 |
|
1181 | |||
1181 | $ (hg clone -U --stream 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) & |
|
1182 | $ (hg clone -U --stream 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) & | |
1182 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
|
1183 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 | |
1183 | $ rm test-repo/.hg/store/00changelog.n |
|
1184 | $ rm test-repo/.hg/store/00changelog.n | |
1184 | $ rm test-repo/.hg/store/00changelog-*.nd |
|
1185 | $ rm test-repo/.hg/store/00changelog-*.nd | |
1185 | $ hg -R test-repo/ debugupdatecache |
|
1186 | $ hg -R test-repo/ debugupdatecache | |
1186 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
|
1187 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 | |
1187 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
|
1188 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 | |
1188 |
|
1189 | |||
1189 | (note: the stream clone code wronly pick the `undo.` files) |
|
1190 | (note: the stream clone code wronly pick the `undo.` files) | |
1190 |
|
1191 | |||
1191 | $ cat clone-output-2 |
|
1192 | $ cat clone-output-2 | |
1192 | adding [s] undo.backup.00manifest.n (62 bytes) (known-bad-output !) |
|
1193 | adding [s] undo.backup.00manifest.n (62 bytes) (known-bad-output !) | |
1193 | adding [s] undo.backup.00changelog.n (62 bytes) (known-bad-output !) |
|
1194 | adding [s] undo.backup.00changelog.n (62 bytes) (known-bad-output !) | |
1194 | adding [s] 00manifest.n (62 bytes) |
|
1195 | adding [s] 00manifest.n (62 bytes) | |
1195 | adding [s] 00manifest-*.nd (118 KB) (glob) |
|
1196 | adding [s] 00manifest-*.nd (118 KB) (glob) | |
1196 | adding [s] 00changelog.n (62 bytes) |
|
1197 | adding [s] 00changelog.n (62 bytes) | |
1197 | adding [s] 00changelog-*.nd (118 KB) (glob) |
|
1198 | adding [s] 00changelog-*.nd (118 KB) (glob) | |
1198 | adding [s] 00manifest.d (492 KB) (zstd !) |
|
1199 | adding [s] 00manifest.d (492 KB) (zstd !) | |
1199 | adding [s] 00manifest.d (452 KB) (no-zstd !) |
|
1200 | adding [s] 00manifest.d (452 KB) (no-zstd !) | |
1200 | adding [s] 00changelog.d (360 KB) (no-zstd !) |
|
1201 | adding [s] 00changelog.d (360 KB) (no-zstd !) | |
1201 | adding [s] 00changelog.d (368 KB) (zstd !) |
|
1202 | adding [s] 00changelog.d (368 KB) (zstd !) | |
1202 | adding [s] 00manifest.i (313 KB) |
|
1203 | adding [s] 00manifest.i (313 KB) | |
1203 | adding [s] 00changelog.i (313 KB) |
|
1204 | adding [s] 00changelog.i (313 KB) | |
1204 |
|
1205 | |||
1205 | Check the result. |
|
1206 | Check the result. | |
1206 |
|
1207 | |||
1207 | $ f --size stream-clone-race-2/.hg/store/00changelog* |
|
1208 | $ f --size stream-clone-race-2/.hg/store/00changelog* | |
1208 | stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !) |
|
1209 | stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !) | |
1209 | stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !) |
|
1210 | stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !) | |
1210 | stream-clone-race-2/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !) |
|
1211 | stream-clone-race-2/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !) | |
1211 | stream-clone-race-2/.hg/store/00changelog.d: size=376950 (zstd !) |
|
1212 | stream-clone-race-2/.hg/store/00changelog.d: size=376950 (zstd !) | |
1212 | stream-clone-race-2/.hg/store/00changelog.d: size=368949 (no-zstd !) |
|
1213 | stream-clone-race-2/.hg/store/00changelog.d: size=368949 (no-zstd !) | |
1213 | stream-clone-race-2/.hg/store/00changelog.i: size=320448 |
|
1214 | stream-clone-race-2/.hg/store/00changelog.i: size=320448 | |
1214 | stream-clone-race-2/.hg/store/00changelog.n: size=62 |
|
1215 | stream-clone-race-2/.hg/store/00changelog.n: size=62 | |
1215 |
|
1216 | |||
1216 | $ hg -R stream-clone-race-2 debugnodemap --metadata | tee client-metadata-2.txt |
|
1217 | $ hg -R stream-clone-race-2 debugnodemap --metadata | tee client-metadata-2.txt | |
1217 | uid: * (glob) |
|
1218 | uid: * (glob) | |
1218 | tip-rev: 5006 |
|
1219 | tip-rev: 5006 | |
1219 | tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b |
|
1220 | tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b | |
1220 | data-length: 121344 (rust !) |
|
1221 | data-length: 121344 (rust !) | |
1221 | data-unused: 192 (rust !) |
|
1222 | data-unused: 192 (rust !) | |
1222 | data-unused: 0.158% (rust !) |
|
1223 | data-unused: 0.158% (rust !) | |
1223 | data-length: 121152 (no-rust no-pure !) |
|
1224 | data-length: 121152 (no-rust no-pure !) | |
1224 | data-unused: 0 (no-rust no-pure !) |
|
1225 | data-unused: 0 (no-rust no-pure !) | |
1225 | data-unused: 0.000% (no-rust no-pure !) |
|
1226 | data-unused: 0.000% (no-rust no-pure !) | |
1226 | data-length: 121344 (pure !) |
|
1227 | data-length: 121344 (pure !) | |
1227 | data-unused: 192 (pure !) |
|
1228 | data-unused: 192 (pure !) | |
1228 | data-unused: 0.158% (pure !) |
|
1229 | data-unused: 0.158% (pure !) | |
1229 |
|
1230 | |||
1230 | We get a usable nodemap, so no rewrite would be needed and the metadata should be identical |
|
1231 | We get a usable nodemap, so no rewrite would be needed and the metadata should be identical | |
1231 | (ie: the following diff should be empty) |
|
1232 | (ie: the following diff should be empty) | |
1232 |
|
1233 | |||
1233 | 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". |
|
1234 | 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". | |
1234 |
|
1235 | |||
1235 | #if no-rust no-pure |
|
1236 | #if no-rust no-pure | |
1236 | $ diff -u server-metadata-2.txt client-metadata-2.txt |
|
1237 | $ diff -u server-metadata-2.txt client-metadata-2.txt | |
1237 | --- server-metadata-2.txt * (glob) |
|
1238 | --- server-metadata-2.txt * (glob) | |
1238 | +++ client-metadata-2.txt * (glob) |
|
1239 | +++ client-metadata-2.txt * (glob) | |
1239 | @@ -1,4 +1,4 @@ |
|
1240 | @@ -1,4 +1,4 @@ | |
1240 | -uid: * (glob) |
|
1241 | -uid: * (glob) | |
1241 | +uid: * (glob) |
|
1242 | +uid: * (glob) | |
1242 | tip-rev: 5006 |
|
1243 | tip-rev: 5006 | |
1243 | tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b |
|
1244 | tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b | |
1244 | data-length: 121152 |
|
1245 | data-length: 121152 | |
1245 | [1] |
|
1246 | [1] | |
1246 | #else |
|
1247 | #else | |
1247 | $ diff -u server-metadata-2.txt client-metadata-2.txt |
|
1248 | $ diff -u server-metadata-2.txt client-metadata-2.txt | |
1248 | #endif |
|
1249 | #endif | |
1249 |
|
1250 | |||
1250 | Clean up after the test |
|
1251 | Clean up after the test | |
1251 |
|
1252 | |||
1252 | $ rm -f $HG_TEST_STREAM_WALKED_FILE_1 |
|
1253 | $ rm -f $HG_TEST_STREAM_WALKED_FILE_1 | |
1253 | $ rm -f $HG_TEST_STREAM_WALKED_FILE_2 |
|
1254 | $ rm -f $HG_TEST_STREAM_WALKED_FILE_2 | |
1254 | $ rm -f $HG_TEST_STREAM_WALKED_FILE_3 |
|
1255 | $ rm -f $HG_TEST_STREAM_WALKED_FILE_3 | |
1255 |
|
1256 |
General Comments 0
You need to be logged in to leave comments.
Login now