Show More
@@ -1,6 +1,26 b'' | |||||
1 | Test transaction safety |
|
1 | Test transaction safety | |
2 | ======================= |
|
2 | ======================= | |
3 |
|
3 | |||
|
4 | #testcases revlogv1 revlogv2 | |||
|
5 | ||||
|
6 | #if revlogv1 | |||
|
7 | ||||
|
8 | $ cat << EOF >> $HGRCPATH | |||
|
9 | > [experimental] | |||
|
10 | > revlogv2=no | |||
|
11 | > EOF | |||
|
12 | ||||
|
13 | #endif | |||
|
14 | ||||
|
15 | #if revlogv2 | |||
|
16 | ||||
|
17 | $ cat << EOF >> $HGRCPATH | |||
|
18 | > [experimental] | |||
|
19 | > revlogv2=enable-unstable-format-and-corrupt-my-data | |||
|
20 | > EOF | |||
|
21 | ||||
|
22 | #endif | |||
|
23 | ||||
4 | This test basic case to make sure external process do not see transaction |
|
24 | This test basic case to make sure external process do not see transaction | |
5 | content until it is committed. |
|
25 | content until it is committed. | |
6 |
|
26 | |||
@@ -103,84 +123,146 b' the repository should still be inline (f' | |||||
103 |
|
123 | |||
104 | $ make_one_commit first |
|
124 | $ make_one_commit first | |
105 | pre-commit: -1 |
|
125 | pre-commit: -1 | |
106 | external: -1 |
|
126 | external: -1 (revlogv1 !) | |
|
127 | external: 0 first (revlogv2 known-bad-output !) | |||
107 | internal: 0 first |
|
128 | internal: 0 first | |
108 | post-tr: 0 first |
|
129 | post-tr: 0 first | |
|
130 | ||||
|
131 | #if revlogv1 | |||
|
132 | ||||
109 | $ hg debugrevlog -c | grep inline |
|
133 | $ hg debugrevlog -c | grep inline | |
110 | flags : inline |
|
134 | flags : inline | |
111 |
|
135 | |||
|
136 | #endif | |||
|
137 | ||||
112 | check this is true for extra commit (inline → inline) |
|
138 | check this is true for extra commit (inline → inline) | |
113 | ----------------------------------------------------- |
|
139 | ----------------------------------------------------- | |
114 |
|
140 | |||
115 | the repository should still be inline (for relevant format) |
|
141 | the repository should still be inline (for relevant format) | |
116 |
|
142 | |||
|
143 | #if revlogv1 | |||
|
144 | ||||
117 | $ hg debugrevlog -c | grep inline |
|
145 | $ hg debugrevlog -c | grep inline | |
118 | flags : inline |
|
146 | flags : inline | |
|
147 | ||||
|
148 | #endif | |||
|
149 | ||||
119 | $ make_one_commit second |
|
150 | $ make_one_commit second | |
120 | pre-commit: 0 first |
|
151 | pre-commit: 0 first | |
121 | external: 0 first |
|
152 | external: 0 first (revlogv1 !) | |
|
153 | external: 1 second (revlogv2 known-bad-output !) | |||
122 | internal: 1 second |
|
154 | internal: 1 second | |
123 | post-tr: 1 second |
|
155 | post-tr: 1 second | |
|
156 | ||||
|
157 | #if revlogv1 | |||
|
158 | ||||
124 | $ hg debugrevlog -c | grep inline |
|
159 | $ hg debugrevlog -c | grep inline | |
125 | flags : inline |
|
160 | flags : inline | |
126 |
|
161 | |||
|
162 | #endif | |||
|
163 | ||||
127 | check this is true for a small pull (inline → inline) |
|
164 | check this is true for a small pull (inline → inline) | |
128 | ----------------------------------------------------- |
|
165 | ----------------------------------------------------- | |
129 |
|
166 | |||
130 | the repository should still be inline (for relevant format) |
|
167 | the repository should still be inline (for relevant format) | |
131 |
|
168 | |||
|
169 | #if revlogv1 | |||
|
170 | ||||
132 | $ hg debugrevlog -c | grep inline |
|
171 | $ hg debugrevlog -c | grep inline | |
133 | flags : inline |
|
172 | flags : inline | |
|
173 | ||||
|
174 | #endif | |||
|
175 | ||||
134 | $ make_one_pull 3 |
|
176 | $ make_one_pull 3 | |
135 | pre-commit: 1 second |
|
177 | pre-commit: 1 second | |
136 | warning: repository is unrelated |
|
178 | warning: repository is unrelated | |
137 | external: 1 second |
|
179 | external: 1 second (revlogv1 !) | |
|
180 | external: 5 r3 (revlogv2 known-bad-output !) | |||
138 | internal: 5 r3 |
|
181 | internal: 5 r3 | |
139 | post-tr: 5 r3 |
|
182 | post-tr: 5 r3 | |
|
183 | ||||
|
184 | #if revlogv1 | |||
|
185 | ||||
140 | $ hg debugrevlog -c | grep inline |
|
186 | $ hg debugrevlog -c | grep inline | |
141 | flags : inline |
|
187 | flags : inline | |
142 |
|
188 | |||
|
189 | #endif | |||
|
190 | ||||
143 | Make a large pull (inline → no-inline) |
|
191 | Make a large pull (inline → no-inline) | |
144 | --------------------------------------- |
|
192 | --------------------------------------- | |
145 |
|
193 | |||
146 | the repository should no longer be inline (for relevant format) |
|
194 | the repository should no longer be inline (for relevant format) | |
147 |
|
195 | |||
|
196 | #if revlogv1 | |||
|
197 | ||||
148 | $ hg debugrevlog -c | grep inline |
|
198 | $ hg debugrevlog -c | grep inline | |
149 | flags : inline |
|
199 | flags : inline | |
|
200 | ||||
|
201 | #endif | |||
|
202 | ||||
150 | $ make_one_pull 400 |
|
203 | $ make_one_pull 400 | |
151 | pre-commit: 5 r3 |
|
204 | pre-commit: 5 r3 | |
152 | external: 5 r3 |
|
205 | external: 5 r3 (revlogv1 !) | |
|
206 | external: 402 r400 (revlogv2 known-bad-output !) | |||
153 | internal: 402 r400 |
|
207 | internal: 402 r400 | |
154 | post-tr: 402 r400 |
|
208 | post-tr: 402 r400 | |
|
209 | ||||
|
210 | #if revlogv1 | |||
|
211 | ||||
155 | $ hg debugrevlog -c | grep inline |
|
212 | $ hg debugrevlog -c | grep inline | |
156 | [1] |
|
213 | [1] | |
157 |
|
214 | |||
|
215 | #endif | |||
|
216 | ||||
158 | check this is true for extra commit (no-inline → no-inline) |
|
217 | check this is true for extra commit (no-inline → no-inline) | |
159 | ----------------------------------------------------------- |
|
218 | ----------------------------------------------------------- | |
160 |
|
219 | |||
161 | the repository should no longer be inline (for relevant format) |
|
220 | the repository should no longer be inline (for relevant format) | |
|
221 | ||||
|
222 | #if revlogv1 | |||
|
223 | ||||
162 | $ hg debugrevlog -c | grep inline |
|
224 | $ hg debugrevlog -c | grep inline | |
163 | [1] |
|
225 | [1] | |
|
226 | ||||
|
227 | #endif | |||
|
228 | ||||
164 | $ make_one_commit third |
|
229 | $ make_one_commit third | |
165 | pre-commit: 402 r400 |
|
230 | pre-commit: 402 r400 | |
166 | external: 402 r400 |
|
231 | external: 402 r400 (revlogv1 !) | |
|
232 | external: 403 third (revlogv2 known-bad-output !) | |||
167 | internal: 403 third |
|
233 | internal: 403 third | |
168 | post-tr: 403 third |
|
234 | post-tr: 403 third | |
|
235 | ||||
|
236 | #if revlogv1 | |||
|
237 | ||||
169 | $ hg debugrevlog -c | grep inline |
|
238 | $ hg debugrevlog -c | grep inline | |
170 | [1] |
|
239 | [1] | |
171 |
|
240 | |||
|
241 | #endif | |||
|
242 | ||||
172 |
|
243 | |||
173 | Make a pull (not-inline → no-inline) |
|
244 | Make a pull (not-inline → no-inline) | |
174 | ------------------------------------- |
|
245 | ------------------------------------- | |
175 |
|
246 | |||
176 | the repository should no longer be inline (for relevant format) |
|
247 | the repository should no longer be inline (for relevant format) | |
177 |
|
248 | |||
|
249 | #if revlogv1 | |||
|
250 | ||||
178 | $ hg debugrevlog -c | grep inline |
|
251 | $ hg debugrevlog -c | grep inline | |
179 | [1] |
|
252 | [1] | |
|
253 | ||||
|
254 | #endif | |||
|
255 | ||||
180 | $ make_one_pull tip |
|
256 | $ make_one_pull tip | |
181 | pre-commit: 403 third |
|
257 | pre-commit: 403 third | |
182 | external: 403 third |
|
258 | external: 403 third (revlogv1 !) | |
|
259 | external: 503 r500 (revlogv2 known-bad-output !) | |||
183 | internal: 503 r500 |
|
260 | internal: 503 r500 | |
184 | post-tr: 503 r500 |
|
261 | post-tr: 503 r500 | |
|
262 | ||||
|
263 | #if revlogv1 | |||
|
264 | ||||
185 | $ hg debugrevlog -c | grep inline |
|
265 | $ hg debugrevlog -c | grep inline | |
186 | [1] |
|
266 | [1] | |
|
267 | ||||
|
268 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now