##// END OF EJS Templates
dirstate: cover each dirstate version when testing for status race...
marmoute -
r51115:35ea3c13 stable
parent child Browse files
Show More
@@ -2,6 +2,8 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
6
5 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
6 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
7 files as clean, or to update directory caches information with dirstate-v2.
9 files as clean, or to update directory caches information with dirstate-v2.
@@ -23,6 +25,23 b' changes happen.'
23 Setup
25 Setup
24 =====
26 =====
25
27
28 $ cat >> $HGRCPATH << EOF
29 > [storage]
30 > dirstate-v2.slow-path=allow
31 > EOF
32
33 #if dirstate-v2
34 $ cat >> $HGRCPATH << EOF
35 > [format]
36 > use-dirstate-v2=yes
37 > EOF
38 #else
39 $ cat >> $HGRCPATH << EOF
40 > [format]
41 > use-dirstate-v2=no
42 > EOF
43 #endif
44
26 $ directories="dir dir/nested dir2"
45 $ directories="dir dir/nested dir2"
27 $ first_files="dir/nested/a dir/b dir/c dir/d dir2/e f"
46 $ first_files="dir/nested/a dir/b dir/c dir/d dir2/e f"
28 $ second_files="g dir/nested/h dir/i dir/j dir2/k dir2/l dir/nested/m"
47 $ second_files="g dir/nested/h dir/i dir/j dir2/k dir2/l dir/nested/m"
@@ -217,10 +236,11 b' The file should in a "added" state'
217
236
218 $ hg status
237 $ hg status
219 A dir/n (no-rhg !)
238 A dir/n (no-rhg !)
220 A dir/n (missing-correct-output rhg !)
239 A dir/n (rhg no-dirstate-v1 !)
240 A dir/n (missing-correct-output rhg dirstate-v1 !)
221 A dir/o
241 A dir/o
222 R dir/nested/m
242 R dir/nested/m
223 ? dir/n (known-bad-output rhg !)
243 ? dir/n (known-bad-output rhg dirstate-v1 !)
224 ? p
244 ? p
225 ? q
245 ? q
226
246
@@ -233,6 +253,7 b' The status process should return a consi'
233 ? p
253 ? p
234 ? q
254 ? q
235 $ cat $TESTTMP/status-race-lock.log
255 $ cat $TESTTMP/status-race-lock.log
256 abort: when writing $TESTTMP/race-with-add/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2 !)
236
257
237 final cleanup
258 final cleanup
238
259
@@ -301,6 +322,7 b' The status process should return a consi'
301 ? p
322 ? p
302 ? q
323 ? q
303 $ cat $TESTTMP/status-race-lock.log
324 $ cat $TESTTMP/status-race-lock.log
325 abort: when removing $TESTTMP/race-with-commit/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2 !)
304
326
305 final cleanup
327 final cleanup
306
328
@@ -403,6 +425,7 b' The status process should return a consi'
403 ? p
425 ? p
404 ? q
426 ? q
405 $ cat $TESTTMP/status-race-lock.log
427 $ cat $TESTTMP/status-race-lock.log
428 abort: when removing $TESTTMP/race-with-status/.hg/dirstate.*: $ENOENT$ (glob) (known-bad-output rhg dirstate-v2 !)
406
429
407 final cleanup
430 final cleanup
408
431
General Comments 0
You need to be logged in to leave comments. Login now