##// END OF EJS Templates
dirstate: check dirstate race condition around status...
marmoute -
r51127:5bf6b801 stable
parent child Browse files
Show More
@@ -251,3 +251,45 b' final cleanup'
251
251
252 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting
252 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting
253 $ cd ..
253 $ cd ..
254
255 Race with a cache updating `hg status`
256 --------------------------------------
257
258 It is interesting to race with "read-only" operation (that still update its cache)
259
260 $ cp -a reference-repo race-with-status
261 $ cd race-with-status
262
263 spin a `hg status` with some caches to update
264
265 $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \
266 > --config rhg.on-unsupported=abort \
267 > --config devel.sync.dirstate.pre-read-file=$TESTTMP/status-race-lock \
268 > &
269 $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting
270 do an update
271
272 $ touch -t 200001020006 f
273 $ hg status
274 A dir/o
275 R dir/nested/m
276 ? dir/n
277 ? p
278 ? q
279 $ touch $TESTTMP/status-race-lock
280 $ wait
281
282 The status process should return a consistent result and not crash.
283
284 $ cat $TESTTMP/status-race-lock.out
285 A dir/o
286 R dir/nested/m
287 ? dir/n
288 ? p
289 ? q
290 $ cat $TESTTMP/status-race-lock.log
291
292 final cleanup
293
294 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting
295 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now