Show More
@@ -2,7 +2,7 b'' | |||||
2 | Check potential race conditions between a status and other operations |
|
2 | Check potential race conditions between a status and other operations | |
3 | ===================================================================== |
|
3 | ===================================================================== | |
4 |
|
4 | |||
5 | #testcases dirstate-v1 dirstate-v2 |
|
5 | #testcases dirstate-v1 dirstate-v2-append dirstate-v2-rewrite | |
6 |
|
6 | |||
7 | The `hg status` command can run without the wlock, however it might end up |
|
7 | The `hg status` command can run without the wlock, however it might end up | |
8 | having to update the on-disk dirstate files, for example to mark ambiguous |
|
8 | having to update the on-disk dirstate files, for example to mark ambiguous | |
@@ -30,7 +30,7 b' Setup' | |||||
30 | > dirstate-v2.slow-path=allow |
|
30 | > dirstate-v2.slow-path=allow | |
31 | > EOF |
|
31 | > EOF | |
32 |
|
32 | |||
33 |
#if dirstate-v |
|
33 | #if no-dirstate-v1 | |
34 | $ cat >> $HGRCPATH << EOF |
|
34 | $ cat >> $HGRCPATH << EOF | |
35 | > [format] |
|
35 | > [format] | |
36 | > use-dirstate-v2=yes |
|
36 | > use-dirstate-v2=yes | |
@@ -42,6 +42,13 b' Setup' | |||||
42 | > EOF |
|
42 | > EOF | |
43 | #endif |
|
43 | #endif | |
44 |
|
44 | |||
|
45 | #if dirstate-v2-rewrite | |||
|
46 | $ d2args="--config devel.dirstate.v2.data_update_mode=force-new" | |||
|
47 | #endif | |||
|
48 | #if dirstate-v2-append | |||
|
49 | $ d2args="--config devel.dirstate.v2.data_update_mode=force-append" | |||
|
50 | #endif | |||
|
51 | ||||
45 | $ directories="dir dir/nested dir2" |
|
52 | $ directories="dir dir/nested dir2" | |
46 | $ first_files="dir/nested/a dir/b dir/c dir/d dir2/e f" |
|
53 | $ first_files="dir/nested/a dir/b dir/c dir/d dir2/e f" | |
47 | $ second_files="g dir/nested/h dir/i dir/j dir2/k dir2/l dir/nested/m" |
|
54 | $ second_files="g dir/nested/h dir/i dir/j dir2/k dir2/l dir/nested/m" | |
@@ -228,7 +235,7 b' spin a `hg status` with some caches to u' | |||||
228 |
|
235 | |||
229 | Add a file |
|
236 | Add a file | |
230 |
|
237 | |||
231 | $ hg add dir/n |
|
238 | $ hg $d2args add dir/n | |
232 | $ touch $TESTTMP/status-race-lock |
|
239 | $ touch $TESTTMP/status-race-lock | |
233 | $ wait |
|
240 | $ wait | |
234 |
|
241 | |||
@@ -236,11 +243,11 b' The file should in a "added" state' | |||||
236 |
|
243 | |||
237 | $ hg status |
|
244 | $ hg status | |
238 | A dir/n (no-rhg !) |
|
245 | A dir/n (no-rhg !) | |
239 |
A dir/n (rhg |
|
246 | A dir/n (rhg dirstate-v2-rewrite !) | |
240 | A dir/n (missing-correct-output rhg dirstate-v1 !) |
|
247 | A dir/n (missing-correct-output rhg dirstate-v1 !) | |
241 | A dir/o |
|
248 | A dir/o | |
242 | R dir/nested/m |
|
249 | R dir/nested/m | |
243 |
? dir/n (known-bad-output rhg dirstate-v |
|
250 | ? dir/n (known-bad-output rhg no-dirstate-v2-rewrite !) | |
244 | ? p |
|
251 | ? p | |
245 | ? q |
|
252 | ? q | |
246 |
|
253 | |||
@@ -253,7 +260,7 b' The status process should return a consi' | |||||
253 | ? p |
|
260 | ? p | |
254 | ? q |
|
261 | ? q | |
255 | $ cat $TESTTMP/status-race-lock.log |
|
262 | $ cat $TESTTMP/status-race-lock.log | |
256 | abort: when writing $TESTTMP/race-with-add/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2 !) |
|
263 | abort: when writing $TESTTMP/race-with-add/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2-rewrite !) | |
257 |
|
264 | |||
258 | final cleanup |
|
265 | final cleanup | |
259 |
|
266 | |||
@@ -277,7 +284,7 b' spin a `hg status` with some caches to u' | |||||
277 |
|
284 | |||
278 | Add a file and force the data file rewrite |
|
285 | Add a file and force the data file rewrite | |
279 |
|
286 | |||
280 | $ hg commit -m created-during-status dir/o |
|
287 | $ hg $d2args commit -m created-during-status dir/o | |
281 | $ touch $TESTTMP/status-race-lock |
|
288 | $ touch $TESTTMP/status-race-lock | |
282 | $ wait |
|
289 | $ wait | |
283 |
|
290 | |||
@@ -322,7 +329,7 b' The status process should return a consi' | |||||
322 | ? p |
|
329 | ? p | |
323 | ? q |
|
330 | ? q | |
324 | $ cat $TESTTMP/status-race-lock.log |
|
331 | $ cat $TESTTMP/status-race-lock.log | |
325 | abort: when removing $TESTTMP/race-with-commit/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2 !) |
|
332 | abort: when removing $TESTTMP/race-with-commit/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2-rewrite !) | |
326 |
|
333 | |||
327 | final cleanup |
|
334 | final cleanup | |
328 |
|
335 | |||
@@ -346,7 +353,7 b' spin a `hg status` with some caches to u' | |||||
346 |
|
353 | |||
347 | Add a file and force the data file rewrite |
|
354 | Add a file and force the data file rewrite | |
348 |
|
355 | |||
349 | $ hg update ".~1" |
|
356 | $ hg $d2args update ".~1" | |
350 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved |
|
357 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
351 | $ touch $TESTTMP/status-race-lock |
|
358 | $ touch $TESTTMP/status-race-lock | |
352 | $ wait |
|
359 | $ wait | |
@@ -400,7 +407,7 b' spin a `hg status` with some caches to u' | |||||
400 | touch g |
|
407 | touch g | |
401 |
|
408 | |||
402 | $ touch -t 200001010025 g |
|
409 | $ touch -t 200001010025 g | |
403 | $ hg status |
|
410 | $ hg $d2args status | |
404 | A dir/o |
|
411 | A dir/o | |
405 | R dir/nested/m |
|
412 | R dir/nested/m | |
406 | ? dir/n |
|
413 | ? dir/n | |
@@ -425,7 +432,7 b' The status process should return a consi' | |||||
425 | ? p |
|
432 | ? p | |
426 | ? q |
|
433 | ? q | |
427 | $ cat $TESTTMP/status-race-lock.log |
|
434 | $ cat $TESTTMP/status-race-lock.log | |
428 | abort: when removing $TESTTMP/race-with-status/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2 !) |
|
435 | abort: when removing $TESTTMP/race-with-status/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2-rewrite !) | |
429 |
|
436 | |||
430 | final cleanup |
|
437 | final cleanup | |
431 |
|
438 |
General Comments 0
You need to be logged in to leave comments.
Login now