Show More
@@ -392,3 +392,42 b' The reader should be fine' | |||
|
392 | 392 | $ cat $TESTTMP/reader.stdout |
|
393 | 393 | 1 (no-eol) |
|
394 | 394 | $ cd .. |
|
395 | ||
|
396 | pending hooks | |
|
397 | ============= | |
|
398 | ||
|
399 | We checks that hooks properly see the inside of the transaction, while other process don't. | |
|
400 | ||
|
401 | $ hg clone --quiet --rev 1 troffset-computation troffset-computation-hooks | |
|
402 | $ cd troffset-computation-hooks | |
|
403 | $ cat > .hg/hgrc <<EOF | |
|
404 | > [hooks] | |
|
405 | > pretxnclose.01-echo = hg cat -r 'max(all())' file | f --size | |
|
406 | > pretxnclose.02-echo = $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/hook-done $TESTTMP/hook-tr-ready | |
|
407 | > pretxnclose.03-abort = false | |
|
408 | > EOF | |
|
409 | ||
|
410 | $ ( | |
|
411 | > $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/hook-tr-ready;\ | |
|
412 | > hg cat -r 'max(all())' file | f --size;\ | |
|
413 | > touch $TESTTMP/hook-done | |
|
414 | > ) >stdout 2>stderr & | |
|
415 | ||
|
416 | $ hg pull ../troffset-computation | |
|
417 | pulling from ../troffset-computation | |
|
418 | searching for changes | |
|
419 | adding changesets | |
|
420 | adding manifests | |
|
421 | adding file changes | |
|
422 | size=131072 | |
|
423 | transaction abort! | |
|
424 | rollback completed | |
|
425 | abort: pretxnclose.03-abort hook exited with status 1 | |
|
426 | [40] | |
|
427 | ||
|
428 | $ cat stdout | |
|
429 | size=1024 | |
|
430 | $ cat stderr | |
|
431 | ||
|
432 | ||
|
433 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now