Show More
@@ -1,28 +1,37 | |||||
1 | Test hangup signal in the middle of transaction |
|
1 | Test hangup signal in the middle of transaction | |
2 |
|
2 | |||
3 | $ "$TESTDIR/hghave" serve fifo || exit 80 |
|
3 | $ "$TESTDIR/hghave" serve fifo || exit 80 | |
4 | $ hg init |
|
4 | $ hg init | |
5 | $ mkfifo p |
|
5 | $ mkfifo p | |
6 | $ hg serve --stdio < p 1>out 2>&1 & |
|
6 | $ hg serve --stdio < p 1>out 2>&1 & | |
7 | $ P=$! |
|
7 | $ P=$! | |
8 |
|
8 | |||
9 | Do test while holding fifo open |
|
9 | Do test while holding fifo open | |
10 |
|
10 | |||
11 | $ ( |
|
11 | $ ( | |
12 | > echo lock |
|
12 | > echo lock | |
13 | > echo addchangegroup |
|
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 |
> kill -HUP $ |
|
24 | > kill -HUP $P | |
16 |
> ) |
|
25 | > ) > p | |
17 |
|
26 | |||
18 | $ wait |
|
27 | $ wait | |
19 |
$ cat |
|
28 | $ cat out | |
20 |
|
|
29 | 0 | |
21 |
|
|
30 | 0 | |
22 |
|
|
31 | adding changesets | |
23 |
|
|
32 | transaction abort! | |
24 |
rollback |
|
33 | rollback completed | |
25 |
|
|
34 | killed! | |
26 |
|
35 | |||
27 |
$ |
|
36 | $ echo .hg/* .hg/store/* | |
28 |
.hg/00 |
|
37 | .hg/00changelog.i .hg/journal.bookmarks .hg/journal.branch .hg/journal.desc .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a .hg/store/journal.phaseroots |
General Comments 0
You need to be logged in to leave comments.
Login now