equal
deleted
inserted
replaced
1 #if unix-permissions no-root |
1 #if unix-permissions no-root no-windows |
|
2 |
|
3 Prepare |
|
4 |
2 $ hg init a |
5 $ hg init a |
3 $ echo a > a/a |
6 $ echo a > a/a |
4 $ hg -R a ci -A -m a |
7 $ hg -R a ci -A -m a |
5 adding a |
8 adding a |
6 |
9 |
7 $ hg clone a b |
10 $ hg clone a b |
8 updating to branch default |
11 updating to branch default |
9 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
10 |
13 |
|
14 One process waiting for another |
|
15 |
|
16 $ cat > hooks.py << EOF |
|
17 > import time |
|
18 > def sleepone(**x): time.sleep(1) |
|
19 > def sleephalf(**x): time.sleep(0.5) |
|
20 > EOF |
11 $ echo b > b/b |
21 $ echo b > b/b |
12 $ hg -R b ci -A -m b |
22 $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
|
23 $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" |
|
24 waiting for lock on working directory of b held by '*:*' (glob) |
|
25 got lock after 1 seconds |
|
26 warning: ignoring unknown working parent d2ae7f538514! |
|
27 $ wait |
|
28 $ cat stdout |
13 adding b |
29 adding b |
|
30 |
|
31 Pushing to a local read-only repo that can't be locked |
14 |
32 |
15 $ chmod 100 a/.hg/store |
33 $ chmod 100 a/.hg/store |
16 |
34 |
17 $ hg -R b push a |
35 $ hg -R b push a |
18 pushing to a |
36 pushing to a |