equal
deleted
inserted
replaced
|
1 |
|
2 $ cat << EOF > buggylocking.py |
|
3 > """A small extension that acquire locks in the wrong order |
|
4 > """ |
|
5 > |
|
6 > from mercurial import cmdutil |
|
7 > |
|
8 > cmdtable = {} |
|
9 > command = cmdutil.command(cmdtable) |
|
10 > |
|
11 > @command('buggylocking', [], '') |
|
12 > def buggylocking(ui, repo): |
|
13 > lo = repo.lock() |
|
14 > wl = repo.wlock() |
|
15 > EOF |
|
16 |
|
17 $ cat << EOF >> $HGRCPATH |
|
18 > [extensions] |
|
19 > buggylocking=$TESTTMP/buggylocking.py |
|
20 > [devel] |
|
21 > all=1 |
|
22 > EOF |
|
23 |
|
24 $ hg init lock-checker |
|
25 $ cd lock-checker |
|
26 $ hg buggylocking |
|
27 "lock" taken before "wlock" |
|
28 $ cat << EOF >> $HGRCPATH |
|
29 > [devel] |
|
30 > all=0 |
|
31 > check-locks=1 |
|
32 > EOF |
|
33 $ hg buggylocking |
|
34 "lock" taken before "wlock" |
|
35 $ hg buggylocking --traceback |
|
36 "lock" taken before "wlock" |
|
37 at: |
|
38 */hg:* in <module> (glob) |
|
39 */mercurial/dispatch.py:* in run (glob) |
|
40 */mercurial/dispatch.py:* in dispatch (glob) |
|
41 */mercurial/dispatch.py:* in _runcatch (glob) |
|
42 */mercurial/dispatch.py:* in _dispatch (glob) |
|
43 */mercurial/dispatch.py:* in runcommand (glob) |
|
44 */mercurial/dispatch.py:* in _runcommand (glob) |
|
45 */mercurial/dispatch.py:* in checkargs (glob) |
|
46 */mercurial/dispatch.py:* in <lambda> (glob) |
|
47 */mercurial/util.py:* in check (glob) |
|
48 $TESTTMP/buggylocking.py:* in buggylocking (glob) |
|
49 $ cd .. |