Show More
@@ -1,28 +1,37 | |||
|
1 | 1 | Test hangup signal in the middle of transaction |
|
2 | 2 | |
|
3 | 3 | $ "$TESTDIR/hghave" serve fifo || exit 80 |
|
4 | 4 | $ hg init |
|
5 | 5 | $ mkfifo p |
|
6 | 6 | $ hg serve --stdio < p 1>out 2>&1 & |
|
7 | 7 | $ P=$! |
|
8 | 8 | |
|
9 | 9 | Do test while holding fifo open |
|
10 | 10 | |
|
11 | 11 | $ ( |
|
12 | 12 | > echo lock |
|
13 | 13 | > echo addchangegroup |
|
14 | > while [ ! -s .hg/store/journal ]; do sleep 0; done | |
|
14 | > start=`date +%s` | |
|
15 | > # 10 second seems much enough to let the server catch up | |
|
16 | > deadline=`expr $start + 10` | |
|
17 | > while [ ! -s .hg/store/journal ]; do | |
|
18 | > sleep 0; | |
|
19 | > if [ `date +%s` -gt $deadline ]; then | |
|
20 | > echo "transaction did not start after 10 seconds" >&2; | |
|
21 | > exit 1; | |
|
22 | > fi | |
|
23 | > done | |
|
15 | 24 |
> kill -HUP $ |
|
16 | 25 |
> ) |
|
17 | 26 | |
|
18 | 27 | $ wait |
|
19 | 28 |
$ cat |
|
20 | 29 |
|
|
21 | 30 |
|
|
22 | 31 |
|
|
23 | 32 |
|
|
24 | 33 |
rollback |
|
25 | 34 |
|
|
26 | 35 | |
|
27 | 36 |
$ |
|
28 | 37 |
.hg/00 |
General Comments 0
You need to be logged in to leave comments.
Login now