Mercurial > forks > mercurial
changeset 53214:13f762389c8c
test-dirstate-race: don't run extra command within the race windows
Over time, new command were added within the race windows without passing them
the "force append" parameter. It could result in non-append update to the
dirstate within the race window. We don't need these command to be within the
race windows so we simply move them higher up.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 27 Apr 2025 11:51:35 +0200 |
parents | 52306175adfb |
children | 2307e8131944 |
files | tests/test-dirstate-read-race.t |
diffstat | 1 files changed, 17 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-dirstate-read-race.t Sat Apr 26 14:21:43 2025 +0200 +++ b/tests/test-dirstate-read-race.t Sun Apr 27 11:51:35 2025 +0200 @@ -195,6 +195,13 @@ $ cp -a reference-repo race-with-commit $ cd race-with-commit + $ hg status + A dir/o + R dir/nested/m + ? dir/n + ? p + ? q + spin a `hg status with some cache to update $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ @@ -205,12 +212,6 @@ Add a do a commit - $ hg status - A dir/o - R dir/nested/m - ? dir/n - ? p - ? q $ hg $d2args commit -m 'racing commit' $ touch $TESTTMP/status-race-lock $ wait @@ -253,15 +254,6 @@ $ cp -a reference-repo race-with-update $ cd race-with-update -spin a `hg status` with some caches to update - - $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ - > --config rhg.on-unsupported=abort \ - > --config ${cfg}=$TESTTMP/status-race-lock \ - > & - $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting -do an update - $ hg status A dir/o R dir/nested/m @@ -279,6 +271,16 @@ (update destination) $ hg log -T '{node|short}\n' --rev ".~1" 4f23db756b09 + +spin a `hg status` with some caches to update + + $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ + > --config rhg.on-unsupported=abort \ + > --config ${cfg}=$TESTTMP/status-race-lock \ + > & + $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting +do an update + $ hg $d2args update --merge ".~1" 0 files updated, 0 files merged, 6 files removed, 0 files unresolved $ touch $TESTTMP/status-race-lock