Show More
@@ -438,3 +438,50 b' final cleanup' | |||
|
438 | 438 | |
|
439 | 439 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting |
|
440 | 440 | $ cd .. |
|
441 | ||
|
442 | Race with the removal of an ambiguous file | |
|
443 | ----------------------è------------------- | |
|
444 | ||
|
445 | $ cp -a reference-repo race-with-remove | |
|
446 | $ cd race-with-remove | |
|
447 | ||
|
448 | spin a `hg status` with some caches to update | |
|
449 | ||
|
450 | $ touch -t 200001010035 dir2/l | |
|
451 | $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ | |
|
452 | > --config rhg.on-unsupported=abort \ | |
|
453 | > --config devel.sync.status.pre-dirstate-write-file=$TESTTMP/status-race-lock \ | |
|
454 | > & | |
|
455 | $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting | |
|
456 | ||
|
457 | remove that same file | |
|
458 | ||
|
459 | $ hg $d2args remove dir2/l | |
|
460 | $ touch $TESTTMP/status-race-lock | |
|
461 | $ wait | |
|
462 | ||
|
463 | file should be marked as removed | |
|
464 | ||
|
465 | $ hg status | |
|
466 | A dir/o | |
|
467 | R dir/nested/m | |
|
468 | R dir2/l | |
|
469 | ? dir/n | |
|
470 | ? p | |
|
471 | ? q | |
|
472 | ||
|
473 | The status process should return a consistent result and not crash. | |
|
474 | ||
|
475 | $ cat $TESTTMP/status-race-lock.out | |
|
476 | A dir/o | |
|
477 | R dir/nested/m | |
|
478 | ? dir/n | |
|
479 | ? p | |
|
480 | ? q | |
|
481 | $ cat $TESTTMP/status-race-lock.log | |
|
482 | abort: when reading $TESTTMP/race-with-remove/dir2/l: $ENOENT$ (known-bad-output rhg !) | |
|
483 | ||
|
484 | final cleanup | |
|
485 | ||
|
486 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting | |
|
487 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now