Show More
@@ -10,14 +10,17 b'' | |||||
10 | > |
|
10 | > | |
11 | > @command('buggylocking', [], '') |
|
11 | > @command('buggylocking', [], '') | |
12 | > def buggylocking(ui, repo): |
|
12 | > def buggylocking(ui, repo): | |
13 | > tr = repo.transaction('buggy') |
|
|||
14 | > # make sure we rollback the transaction as we don't want to rely on the__del__ |
|
|||
15 | > tr.release() |
|
|||
16 | > lo = repo.lock() |
|
13 | > lo = repo.lock() | |
17 | > wl = repo.wlock() |
|
14 | > wl = repo.wlock() | |
18 | > wl.release() |
|
15 | > wl.release() | |
19 | > lo.release() |
|
16 | > lo.release() | |
20 | > |
|
17 | > | |
|
18 | > @command('buggytransaction', [], '') | |||
|
19 | > def buggylocking(ui, repo): | |||
|
20 | > tr = repo.transaction('buggy') | |||
|
21 | > # make sure we rollback the transaction as we don't want to rely on the__del__ | |||
|
22 | > tr.release() | |||
|
23 | > | |||
21 | > @command('properlocking', [], '') |
|
24 | > @command('properlocking', [], '') | |
22 | > def properlocking(ui, repo): |
|
25 | > def properlocking(ui, repo): | |
23 | > """check that reentrance is fine""" |
|
26 | > """check that reentrance is fine""" | |
@@ -74,7 +77,6 b'' | |||||
74 | $ hg init lock-checker |
|
77 | $ hg init lock-checker | |
75 | $ cd lock-checker |
|
78 | $ cd lock-checker | |
76 | $ hg buggylocking |
|
79 | $ hg buggylocking | |
77 | devel-warn: transaction with no lock at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) |
|
|||
78 | devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) |
|
80 | devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) | |
79 | $ cat << EOF >> $HGRCPATH |
|
81 | $ cat << EOF >> $HGRCPATH | |
80 | > [devel] |
|
82 | > [devel] | |
@@ -82,21 +84,8 b'' | |||||
82 | > check-locks=1 |
|
84 | > check-locks=1 | |
83 | > EOF |
|
85 | > EOF | |
84 | $ hg buggylocking |
|
86 | $ hg buggylocking | |
85 | devel-warn: transaction with no lock at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) |
|
|||
86 | devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) |
|
87 | devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) | |
87 | $ hg buggylocking --traceback |
|
88 | $ hg buggylocking --traceback | |
88 | devel-warn: transaction with no lock at: |
|
|||
89 | */hg:* in * (glob) |
|
|||
90 | */mercurial/dispatch.py:* in run (glob) |
|
|||
91 | */mercurial/dispatch.py:* in dispatch (glob) |
|
|||
92 | */mercurial/dispatch.py:* in _runcatch (glob) |
|
|||
93 | */mercurial/dispatch.py:* in _dispatch (glob) |
|
|||
94 | */mercurial/dispatch.py:* in runcommand (glob) |
|
|||
95 | */mercurial/dispatch.py:* in _runcommand (glob) |
|
|||
96 | */mercurial/dispatch.py:* in checkargs (glob) |
|
|||
97 | */mercurial/dispatch.py:* in <lambda> (glob) |
|
|||
98 | */mercurial/util.py:* in check (glob) |
|
|||
99 | $TESTTMP/buggylocking.py:* in buggylocking (glob) |
|
|||
100 | devel-warn: "wlock" acquired after "lock" at: |
|
89 | devel-warn: "wlock" acquired after "lock" at: | |
101 | */hg:* in * (glob) |
|
90 | */hg:* in * (glob) | |
102 | */mercurial/dispatch.py:* in run (glob) |
|
91 | */mercurial/dispatch.py:* in run (glob) | |
@@ -167,4 +156,10 b'' | |||||
167 | $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) |
|
156 | $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) | |
168 | 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob) |
|
157 | 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob) | |
169 | 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 9 |
|
158 | 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 9 | |
|
159 | ||||
|
160 | Test programming error failure: | |||
|
161 | ||||
|
162 | $ hg buggytransaction | |||
|
163 | devel-warn: transaction with no lock at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) | |||
|
164 | ||||
170 | $ cd .. |
|
165 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now