##// END OF EJS Templates
tests: avoid deprecation warning
Matt Mackall -
r24392:dc7588ce default
parent child Browse files
Show More
@@ -1,65 +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 > wl.release()
17 > lo.release()
16 18 > EOF
17 19
18 20 $ cat << EOF >> $HGRCPATH
19 21 > [extensions]
20 22 > buggylocking=$TESTTMP/buggylocking.py
21 23 > [devel]
22 24 > all=1
23 25 > EOF
24 26
25 27 $ hg init lock-checker
26 28 $ cd lock-checker
27 29 $ hg buggylocking
28 30 transaction with no lock
29 31 "lock" taken before "wlock"
30 32 $ cat << EOF >> $HGRCPATH
31 33 > [devel]
32 34 > all=0
33 35 > check-locks=1
34 36 > EOF
35 37 $ hg buggylocking
36 38 transaction with no lock
37 39 "lock" taken before "wlock"
38 40 $ hg buggylocking --traceback
39 41 transaction with no lock
40 42 at:
41 43 */hg:* in <module> (glob)
42 44 */mercurial/dispatch.py:* in run (glob)
43 45 */mercurial/dispatch.py:* in dispatch (glob)
44 46 */mercurial/dispatch.py:* in _runcatch (glob)
45 47 */mercurial/dispatch.py:* in _dispatch (glob)
46 48 */mercurial/dispatch.py:* in runcommand (glob)
47 49 */mercurial/dispatch.py:* in _runcommand (glob)
48 50 */mercurial/dispatch.py:* in checkargs (glob)
49 51 */mercurial/dispatch.py:* in <lambda> (glob)
50 52 */mercurial/util.py:* in check (glob)
51 53 $TESTTMP/buggylocking.py:* in buggylocking (glob)
52 54 "lock" taken before "wlock"
53 55 at:
54 56 */hg:* in <module> (glob)
55 57 */mercurial/dispatch.py:* in run (glob)
56 58 */mercurial/dispatch.py:* in dispatch (glob)
57 59 */mercurial/dispatch.py:* in _runcatch (glob)
58 60 */mercurial/dispatch.py:* in _dispatch (glob)
59 61 */mercurial/dispatch.py:* in runcommand (glob)
60 62 */mercurial/dispatch.py:* in _runcommand (glob)
61 63 */mercurial/dispatch.py:* in checkargs (glob)
62 64 */mercurial/dispatch.py:* in <lambda> (glob)
63 65 */mercurial/util.py:* in check (glob)
64 66 $TESTTMP/buggylocking.py:* in buggylocking (glob)
65 67 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now