Mercurial > hg
annotate tests/test-lock-badness.t @ 43252:32187ae9eeb3
copies: simplify the handling of merges
Instead of stacking copies for both parent on the head, we move copies outside
of the heap into a dedicated dictionary. The two side of merge can we merged
sooner, making the algorithm simpler.
This simplicity reflect in the heap structure and speed up the execution for
copies involving a large amount of merges.
Here are timing for perfpathcopies of multiple revision pairs.
- filelog: timing using filelog (with the introrev condition dropped)
- base: this series base
- before: the parent of this changeset
- after: this changeset
revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29
filelog: ! wall 3.679613 comb 3.680000 user 3.580000 sys 0.100000 (median of 3)
base: ! wall 8.884369 comb 8.880000 user 8.850000 sys 0.030000 (median of 3)
before: ! wall 8.443747 comb 8.420000 user 8.410000 sys 0.010000 (median of 3)
after: ! wall 4.697917 comb 4.690000 user 4.660000 sys 0.030000 (median of 3)
revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2
filelog: ! wall 0.003357 comb 0.010000 user 0.010000 sys 0.000000 (median of 781)
base: ! wall 12.398524 comb 12.400000 user 12.330000 sys 0.070000 (median of 3)
before: ! wall 10.852593 comb 10.850000 user 10.800000 sys 0.050000 (median of 3)
after: ! wall 6.750832 comb 6.750000 user 6.640000 sys 0.110000 (median of 3)
revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0
filelog: ! wall 2.754687 comb 2.760000 user 2.650000 sys 0.110000 (median of 4)
base: ! wall 1.423166 comb 1.420000 user 1.400000 sys 0.020000 (median of 8)
before: ! wall 1.068041 comb 1.060000 user 1.050000 sys 0.010000 (median of 10)
after: ! wall 1.045916 comb 1.050000 user 1.040000 sys 0.010000 (median of 10)
revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f
filelog: ! wall 1.552293 comb 1.550000 user 1.510000 sys 0.040000 (median of 6
base: ! wall 0.022662 comb 0.020000 user 0.020000 sys 0.000000 (median of 128)
before: ! wall 0.021111 comb 0.020000 user 0.020000 sys 0.000000 (median of 139)
after: ! wall 0.021577 comb 0.020000 user 0.020000 sys 0.000000 (median of 138)
revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63
filelog: ! wall 1.500983 comb 1.500000 user 1.420000 sys 0.080000 (median of 7)
base: ! wall 0.006956 comb 0.010000 user 0.010000 sys 0.000000 (median of 392)
before: ! wall 0.004356 comb 0.010000 user 0.010000 sys 0.000000 (median of 675)
after: ! wall 0.004329 comb 0.000000 user 0.000000 sys 0.000000 (median of 682)
revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e
filelog: ! wall 0.011745 comb 0.020000 user 0.020000 sys 0.000000 (median of 250)
base: ! wall 0.000156 comb 0.000000 user 0.000000 sys 0.000000 (median of 17180)
before: ! wall 0.000100 comb 0.000000 user 0.000000 sys 0.000000 (median of 26912)
after: ! wall 0.000105 comb 0.000000 user 0.000000 sys 0.000000 (median of 25689)
revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe
filelog: ! wall 3.228230 comb 3.230000 user 3.110000 sys 0.120000 (median of 4)
base: ! wall 0.997640 comb 1.000000 user 0.980000 sys 0.020000 (median of 10)
before: ! wall 0.778291 comb 0.780000 user 0.780000 sys 0.000000 (median of 13)
after: ! wall 0.706594 comb 0.710000 user 0.710000 sys 0.000000 (median of 15)
revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d
filelog: ! wall 1.052501 comb 1.060000 user 1.040000 sys 0.020000 (median of 10
base: ! wall 0.214519 comb 0.220000 user 0.220000 sys 0.000000 (median of 45)
before: ! wall 0.160804 comb 0.160000 user 0.160000 sys 0.000000 (median of 62)
after: ! wall 0.163736 comb 0.160000 user 0.160000 sys 0.000000 (median of 60)
Differential Revision: https://phab.mercurial-scm.org/D7069
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 02 Oct 2019 13:43:27 -0400 |
parents | 1e1c1bfb0be4 |
children | e0dbfbd4062c |
rev | line source |
---|---|
22047
8fb6844a4ff1
tests: change some #ifs to #requires
Matt Mackall <mpm@selenic.com>
parents:
20969
diff
changeset
|
1 #require unix-permissions no-root no-windows |
20380
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
2 |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
3 Prepare |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
4 |
12071
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
5 $ hg init a |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
6 $ echo a > a/a |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
7 $ hg -R a ci -A -m a |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
8 adding a |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
9 |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
10 $ hg clone a b |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
11 updating to branch default |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
2016
ff5c9a92f556
fix backtrace printed when cannot get lock.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
13 |
23032
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
14 Test that raising an exception in the release function doesn't cause the lock to choke |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
15 |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
16 $ cat > testlock.py << EOF |
32337
46ba2cdda476
registrar: move cmdutil.command to registrar module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
29883
diff
changeset
|
17 > from mercurial import error, registrar |
23032
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
18 > |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
19 > cmdtable = {} |
32337
46ba2cdda476
registrar: move cmdutil.command to registrar module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
29883
diff
changeset
|
20 > command = registrar.command(cmdtable) |
23032
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
21 > |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
22 > def acquiretestlock(repo, releaseexc): |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
23 > def unlock(): |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
24 > if releaseexc: |
36643
1e1c1bfb0be4
py3: add some b'' to make test-lock-badness.t happy
Yuya Nishihara <yuya@tcha.org>
parents:
35209
diff
changeset
|
25 > raise error.Abort(b'expected release exception') |
1e1c1bfb0be4
py3: add some b'' to make test-lock-badness.t happy
Yuya Nishihara <yuya@tcha.org>
parents:
35209
diff
changeset
|
26 > l = repo._lock(repo.vfs, b'testlock', False, unlock, None, b'test lock') |
23032
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
27 > return l |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
28 > |
33097
fce4ed2912bb
py3: make sure commands name are bytes in tests
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
29 > @command(b'testlockexc') |
23032
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
30 > def testlockexc(ui, repo): |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
31 > testlock = acquiretestlock(repo, True) |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
32 > try: |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
33 > testlock.release() |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
34 > finally: |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
35 > try: |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
36 > testlock = acquiretestlock(repo, False) |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
37 > except error.LockHeld: |
36643
1e1c1bfb0be4
py3: add some b'' to make test-lock-badness.t happy
Yuya Nishihara <yuya@tcha.org>
parents:
35209
diff
changeset
|
38 > raise error.Abort(b'lockfile on disk even after releasing!') |
23032
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
39 > testlock.release() |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
40 > EOF |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
41 $ cat >> $HGRCPATH << EOF |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
42 > [extensions] |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
43 > testlock=$TESTTMP/testlock.py |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
44 > EOF |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
45 |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
46 $ hg -R b testlockexc |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
47 abort: expected release exception |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
48 [255] |
f484be02bd35
lock: while releasing, unlink lockfile even if the release function throws
Siddharth Agarwal <sid0@fb.com>
parents:
22047
diff
changeset
|
49 |
20380
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
50 One process waiting for another |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
51 |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
52 $ cat > hooks.py << EOF |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
53 > import time |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
54 > def sleepone(**x): time.sleep(1) |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
55 > def sleephalf(**x): time.sleep(0.5) |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
56 > EOF |
12071
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
57 $ echo b > b/b |
20380
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
58 $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
29008
38292b227deb
tests: test-lock-badness.t message could come later
timeless <timeless@mozdev.org>
parents:
26587
diff
changeset
|
59 $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
35209
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
60 > > preup-stdout 2>preup-stderr |
29008
38292b227deb
tests: test-lock-badness.t message could come later
timeless <timeless@mozdev.org>
parents:
26587
diff
changeset
|
61 $ wait |
35209
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
62 $ cat preup-stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
63 $ cat preup-stderr |
29883
0c8c388c7d62
lock: show more detail for new-style locks in lock waiting message (issue4752)
Mark Ignacio <mignacio@fb.com>
parents:
29008
diff
changeset
|
64 waiting for lock on working directory of b held by process '*' on host '*' (glob) |
29008
38292b227deb
tests: test-lock-badness.t message could come later
timeless <timeless@mozdev.org>
parents:
26587
diff
changeset
|
65 got lock after * seconds (glob) |
20380
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
66 $ cat stdout |
12071
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
67 adding b |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
68 |
35209
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
69 On processs waiting on another, warning after a long time. |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
70 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
71 $ echo b > b/c |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
72 $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
73 $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
74 > --config ui.timeout.warn=250 \ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
75 > > preup-stdout 2>preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
76 $ wait |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
77 $ cat preup-stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
78 $ cat preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
79 $ cat stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
80 adding c |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
81 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
82 On processs waiting on another, warning disabled. |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
83 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
84 $ echo b > b/d |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
85 $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
86 $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
87 > --config ui.timeout.warn=-1 \ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
88 > > preup-stdout 2>preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
89 $ wait |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
90 $ cat preup-stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
91 $ cat preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
92 $ cat stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
93 adding d |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
94 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
95 check we still print debug output |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
96 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
97 On processs waiting on another, warning after a long time (debug output on) |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
98 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
99 $ echo b > b/e |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
100 $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
101 $ hg -R b up --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
102 > --config ui.timeout.warn=250 --debug\ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
103 > > preup-stdout 2>preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
104 $ wait |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
105 $ cat preup-stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
106 calling hook pre-update: hghook_pre-update.sleephalf |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
107 waiting for lock on working directory of b held by process '*' on host '*' (glob) |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
108 got lock after * seconds (glob) |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
109 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
110 $ cat preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
111 $ cat stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
112 adding e |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
113 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
114 On processs waiting on another, warning disabled, (debug output on) |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
115 |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
116 $ echo b > b/f |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
117 $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
118 $ hg -R b up --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
119 > --config ui.timeout.warn=-1 --debug\ |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
120 > > preup-stdout 2>preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
121 $ wait |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
122 $ cat preup-stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
123 calling hook pre-update: hghook_pre-update.sleephalf |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
124 waiting for lock on working directory of b held by process '*' on host '*' (glob) |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
125 got lock after * seconds (glob) |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
126 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
127 $ cat preup-stderr |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
128 $ cat stdout |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
129 adding f |
9153871d50e0
lock: allow to configure when the lock messages are displayed
Boris Feld <boris.feld@octobus.net>
parents:
33097
diff
changeset
|
130 |
20380
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
131 Pushing to a local read-only repo that can't be locked |
c697b70f295f
localrepo: give a sigh of relief when getting lock after waiting for it
Mads Kiilerich <madski@unity3d.com>
parents:
20008
diff
changeset
|
132 |
12071
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
133 $ chmod 100 a/.hg/store |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
134 |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
135 $ hg -R b push a |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
136 pushing to a |
20969
7a679918ee2b
localrepo: add unbundle support
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20653
diff
changeset
|
137 searching for changes |
12071
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
138 abort: could not lock repository a: Permission denied |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12071
diff
changeset
|
139 [255] |
12071
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
140 |
45ff6dcf82ea
tests: unify test-lock-badness
Adrian Buehlmann <adrian@cadifra.com>
parents:
3853
diff
changeset
|
141 $ chmod 700 a/.hg/store |