Show More
@@ -359,3 +359,52 b' final cleanup' | |||
|
359 | 359 | |
|
360 | 360 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting |
|
361 | 361 | $ cd .. |
|
362 | ||
|
363 | Race with another status | |
|
364 | ------------------------ | |
|
365 | ||
|
366 | $ cp -a reference-repo race-with-status | |
|
367 | $ cd race-with-status | |
|
368 | ||
|
369 | spin a `hg status` with some caches to update | |
|
370 | ||
|
371 | $ touch -t 200001010030 dir/nested/h | |
|
372 | $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ | |
|
373 | > --config rhg.on-unsupported=abort \ | |
|
374 | > --config devel.sync.status.pre-dirstate-write-file=$TESTTMP/status-race-lock \ | |
|
375 | > & | |
|
376 | $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting | |
|
377 | ||
|
378 | touch g | |
|
379 | ||
|
380 | $ touch -t 200001010025 g | |
|
381 | $ hg status | |
|
382 | A dir/o | |
|
383 | R dir/nested/m | |
|
384 | ? dir/n | |
|
385 | ? p | |
|
386 | ? q | |
|
387 | $ touch $TESTTMP/status-race-lock | |
|
388 | $ wait | |
|
389 | ||
|
390 | the first update should be on disk | |
|
391 | ||
|
392 | $ hg debugstate --all | grep "g" | |
|
393 | n 644 0 2000-01-01 00:25:00 g (no-rhg !) | |
|
394 | n 644 0 2000-01-01 00:25:00 g (missing-correct-output rhg !) | |
|
395 | n 644 0 2000-01-01 00:10:00 g (known-bad-output rhg !) | |
|
396 | ||
|
397 | The status process should return a consistent result and not crash. | |
|
398 | ||
|
399 | $ cat $TESTTMP/status-race-lock.out | |
|
400 | A dir/o | |
|
401 | R dir/nested/m | |
|
402 | ? dir/n | |
|
403 | ? p | |
|
404 | ? q | |
|
405 | $ cat $TESTTMP/status-race-lock.log | |
|
406 | ||
|
407 | final cleanup | |
|
408 | ||
|
409 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting | |
|
410 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now