Show More
@@ -1,67 +1,67 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ cat << EOF > buggylocking.py |
|
3 | 3 | > """A small extension that acquire locks in the wrong order |
|
4 | 4 | > """ |
|
5 | 5 | > |
|
6 | 6 | > from mercurial import cmdutil |
|
7 | 7 | > |
|
8 | 8 | > cmdtable = {} |
|
9 | 9 | > command = cmdutil.command(cmdtable) |
|
10 | 10 | > |
|
11 | 11 | > @command('buggylocking', [], '') |
|
12 | 12 | > def buggylocking(ui, repo): |
|
13 | 13 | > tr = repo.transaction('buggy') |
|
14 | 14 | > lo = repo.lock() |
|
15 | 15 | > wl = repo.wlock() |
|
16 | 16 | > wl.release() |
|
17 | 17 | > lo.release() |
|
18 | 18 | > EOF |
|
19 | 19 | |
|
20 | 20 | $ cat << EOF >> $HGRCPATH |
|
21 | 21 | > [extensions] |
|
22 | 22 | > buggylocking=$TESTTMP/buggylocking.py |
|
23 | 23 | > [devel] |
|
24 | 24 | > all=1 |
|
25 | 25 | > EOF |
|
26 | 26 | |
|
27 | 27 | $ hg init lock-checker |
|
28 | 28 | $ cd lock-checker |
|
29 | 29 | $ hg buggylocking |
|
30 | 30 | transaction with no lock |
|
31 | 31 | "lock" taken before "wlock" |
|
32 | 32 | $ cat << EOF >> $HGRCPATH |
|
33 | 33 | > [devel] |
|
34 | 34 | > all=0 |
|
35 | 35 | > check-locks=1 |
|
36 | 36 | > EOF |
|
37 | 37 | $ hg buggylocking |
|
38 | 38 | transaction with no lock |
|
39 | 39 | "lock" taken before "wlock" |
|
40 | 40 | $ hg buggylocking --traceback |
|
41 | 41 | transaction with no lock |
|
42 | 42 | at: |
|
43 |
*/hg:* in |
|
|
43 | */hg:* in * (glob) | |
|
44 | 44 | */mercurial/dispatch.py:* in run (glob) |
|
45 | 45 | */mercurial/dispatch.py:* in dispatch (glob) |
|
46 | 46 | */mercurial/dispatch.py:* in _runcatch (glob) |
|
47 | 47 | */mercurial/dispatch.py:* in _dispatch (glob) |
|
48 | 48 | */mercurial/dispatch.py:* in runcommand (glob) |
|
49 | 49 | */mercurial/dispatch.py:* in _runcommand (glob) |
|
50 | 50 | */mercurial/dispatch.py:* in checkargs (glob) |
|
51 | 51 | */mercurial/dispatch.py:* in <lambda> (glob) |
|
52 | 52 | */mercurial/util.py:* in check (glob) |
|
53 | 53 | $TESTTMP/buggylocking.py:* in buggylocking (glob) |
|
54 | 54 | "lock" taken before "wlock" |
|
55 | 55 | at: |
|
56 |
*/hg:* in |
|
|
56 | */hg:* in * (glob) | |
|
57 | 57 | */mercurial/dispatch.py:* in run (glob) |
|
58 | 58 | */mercurial/dispatch.py:* in dispatch (glob) |
|
59 | 59 | */mercurial/dispatch.py:* in _runcatch (glob) |
|
60 | 60 | */mercurial/dispatch.py:* in _dispatch (glob) |
|
61 | 61 | */mercurial/dispatch.py:* in runcommand (glob) |
|
62 | 62 | */mercurial/dispatch.py:* in _runcommand (glob) |
|
63 | 63 | */mercurial/dispatch.py:* in checkargs (glob) |
|
64 | 64 | */mercurial/dispatch.py:* in <lambda> (glob) |
|
65 | 65 | */mercurial/util.py:* in check (glob) |
|
66 | 66 | $TESTTMP/buggylocking.py:* in buggylocking (glob) |
|
67 | 67 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now