##// END OF EJS Templates
dirstate: test a `hg status` raced by a `hg update`...
marmoute -
r51113:ee75dd84 stable
parent child Browse files
Show More
@@ -307,3 +307,55 b' final cleanup'
307 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting
307 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting
308 $ cd ..
308 $ cd ..
309
309
310 Race with a `hg update`
311 ----------------------
312
313 $ cp -a reference-repo race-with-update
314 $ cd race-with-update
315
316 spin a `hg status` with some caches to update
317
318 $ touch -t 200001020001 dir2/k
319 $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \
320 > --config rhg.on-unsupported=abort \
321 > --config devel.sync.status.pre-dirstate-write-file=$TESTTMP/status-race-lock \
322 > &
323 $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting
324
325 Add a file and force the data file rewrite
326
327 $ hg update ".~1"
328 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
329 $ touch $TESTTMP/status-race-lock
330 $ wait
331
332 The parent must change and the status should be clean
333
334 $ hg summary
335 parent: 0:4f23db756b09
336 recreate a bunch of files to facilitate dirstate-v2 append
337 branch: default
338 commit: 1 added, 3 unknown (new branch head)
339 update: 1 new changesets (update)
340 phases: 2 draft
341 $ hg status
342 A dir/o
343 ? dir/n
344 ? p
345 ? q
346
347 The status process should return a consistent result and not crash.
348
349 $ cat $TESTTMP/status-race-lock.out
350 A dir/o
351 R dir/nested/m
352 ? dir/n
353 ? p
354 ? q
355 $ cat $TESTTMP/status-race-lock.log
356 abort: when reading $TESTTMP/race-with-update/dir2/k: $ENOENT$ (known-bad-output rhg !)
357
358 final cleanup
359
360 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting
361 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now