##// END OF EJS Templates
tests: update test-devel-warnings.t output with chg...
Pulkit Goyal -
r45103:54d5424d default
parent child Browse files
Show More
@@ -1,387 +1,390 b''
1
1
2 $ cat << EOF > buggylocking.py
2 $ cat << EOF > buggylocking.py
3 > """A small extension that tests our developer warnings
3 > """A small extension that tests our developer warnings
4 > """
4 > """
5 >
5 >
6 > from mercurial import error, registrar, repair, util
6 > from mercurial import error, registrar, repair, util
7 >
7 >
8 > cmdtable = {}
8 > cmdtable = {}
9 > command = registrar.command(cmdtable)
9 > command = registrar.command(cmdtable)
10 >
10 >
11 > @command(b'buggylocking', [], '')
11 > @command(b'buggylocking', [], '')
12 > def buggylocking(ui, repo):
12 > def buggylocking(ui, repo):
13 > lo = repo.lock()
13 > lo = repo.lock()
14 > wl = repo.wlock()
14 > wl = repo.wlock()
15 > wl.release()
15 > wl.release()
16 > lo.release()
16 > lo.release()
17 >
17 >
18 > @command(b'buggytransaction', [], '')
18 > @command(b'buggytransaction', [], '')
19 > def buggylocking(ui, repo):
19 > def buggylocking(ui, repo):
20 > tr = repo.transaction(b'buggy')
20 > tr = repo.transaction(b'buggy')
21 > # make sure we rollback the transaction as we don't want to rely on the__del__
21 > # make sure we rollback the transaction as we don't want to rely on the__del__
22 > tr.release()
22 > tr.release()
23 >
23 >
24 > @command(b'properlocking', [], '')
24 > @command(b'properlocking', [], '')
25 > def properlocking(ui, repo):
25 > def properlocking(ui, repo):
26 > """check that reentrance is fine"""
26 > """check that reentrance is fine"""
27 > wl = repo.wlock()
27 > wl = repo.wlock()
28 > lo = repo.lock()
28 > lo = repo.lock()
29 > tr = repo.transaction(b'proper')
29 > tr = repo.transaction(b'proper')
30 > tr2 = repo.transaction(b'proper')
30 > tr2 = repo.transaction(b'proper')
31 > lo2 = repo.lock()
31 > lo2 = repo.lock()
32 > wl2 = repo.wlock()
32 > wl2 = repo.wlock()
33 > wl2.release()
33 > wl2.release()
34 > lo2.release()
34 > lo2.release()
35 > tr2.close()
35 > tr2.close()
36 > tr.close()
36 > tr.close()
37 > lo.release()
37 > lo.release()
38 > wl.release()
38 > wl.release()
39 >
39 >
40 > @command(b'nowaitlocking', [], '')
40 > @command(b'nowaitlocking', [], '')
41 > def nowaitlocking(ui, repo):
41 > def nowaitlocking(ui, repo):
42 > lo = repo.lock()
42 > lo = repo.lock()
43 > wl = repo.wlock(wait=False)
43 > wl = repo.wlock(wait=False)
44 > wl.release()
44 > wl.release()
45 > lo.release()
45 > lo.release()
46 >
46 >
47 > @command(b'no-wlock-write', [], '')
47 > @command(b'no-wlock-write', [], '')
48 > def nowlockwrite(ui, repo):
48 > def nowlockwrite(ui, repo):
49 > with repo.vfs(b'branch', b'a'):
49 > with repo.vfs(b'branch', b'a'):
50 > pass
50 > pass
51 >
51 >
52 > @command(b'no-lock-write', [], '')
52 > @command(b'no-lock-write', [], '')
53 > def nolockwrite(ui, repo):
53 > def nolockwrite(ui, repo):
54 > with repo.svfs(b'fncache', b'a'):
54 > with repo.svfs(b'fncache', b'a'):
55 > pass
55 > pass
56 >
56 >
57 > @command(b'stripintr', [], '')
57 > @command(b'stripintr', [], '')
58 > def stripintr(ui, repo):
58 > def stripintr(ui, repo):
59 > lo = repo.lock()
59 > lo = repo.lock()
60 > tr = repo.transaction(b'foobar')
60 > tr = repo.transaction(b'foobar')
61 > try:
61 > try:
62 > repair.strip(repo.ui, repo, [repo[b'.'].node()])
62 > repair.strip(repo.ui, repo, [repo[b'.'].node()])
63 > finally:
63 > finally:
64 > lo.release()
64 > lo.release()
65 > @command(b'oldanddeprecated', [], '')
65 > @command(b'oldanddeprecated', [], '')
66 > def oldanddeprecated(ui, repo):
66 > def oldanddeprecated(ui, repo):
67 > """test deprecation warning API"""
67 > """test deprecation warning API"""
68 > def foobar(ui):
68 > def foobar(ui):
69 > ui.deprecwarn(b'foorbar is deprecated, go shopping', b'42.1337')
69 > ui.deprecwarn(b'foorbar is deprecated, go shopping', b'42.1337')
70 > foobar(ui)
70 > foobar(ui)
71 > @command(b'nouiwarning', [], '')
71 > @command(b'nouiwarning', [], '')
72 > def nouiwarning(ui, repo):
72 > def nouiwarning(ui, repo):
73 > util.nouideprecwarn(b'this is a test', b'13.37')
73 > util.nouideprecwarn(b'this is a test', b'13.37')
74 > @command(b'programmingerror', [], '')
74 > @command(b'programmingerror', [], '')
75 > def programmingerror(ui, repo):
75 > def programmingerror(ui, repo):
76 > raise error.ProgrammingError(b'something went wrong', hint=b'try again')
76 > raise error.ProgrammingError(b'something went wrong', hint=b'try again')
77 > EOF
77 > EOF
78
78
79 $ cat << EOF >> $HGRCPATH
79 $ cat << EOF >> $HGRCPATH
80 > [extensions]
80 > [extensions]
81 > buggylocking=$TESTTMP/buggylocking.py
81 > buggylocking=$TESTTMP/buggylocking.py
82 > mock=$TESTDIR/mockblackbox.py
82 > mock=$TESTDIR/mockblackbox.py
83 > blackbox=
83 > blackbox=
84 > [devel]
84 > [devel]
85 > all-warnings=1
85 > all-warnings=1
86 > [blackbox]
86 > [blackbox]
87 > track = command, commandexception, commandfinish, develwarn
87 > track = command, commandexception, commandfinish, develwarn
88 > EOF
88 > EOF
89
89
90 $ hg init lock-checker
90 $ hg init lock-checker
91 $ cd lock-checker
91 $ cd lock-checker
92 $ hg buggylocking
92 $ hg buggylocking
93 devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob)
93 devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob)
94 $ cat << EOF >> $HGRCPATH
94 $ cat << EOF >> $HGRCPATH
95 > [devel]
95 > [devel]
96 > all=0
96 > all=0
97 > check-locks=1
97 > check-locks=1
98 > EOF
98 > EOF
99 $ hg buggylocking
99 $ hg buggylocking
100 devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob)
100 devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob)
101 #if no-chg
101 #if no-chg
102 $ hg buggylocking --traceback
102 $ hg buggylocking --traceback
103 devel-warn: "wlock" acquired after "lock" at:
103 devel-warn: "wlock" acquired after "lock" at:
104 */hg:* in <module> (glob) (?)
104 */hg:* in <module> (glob) (?)
105 */mercurial/dispatch.py:* in run (glob)
105 */mercurial/dispatch.py:* in run (glob)
106 */mercurial/dispatch.py:* in dispatch (glob)
106 */mercurial/dispatch.py:* in dispatch (glob)
107 */mercurial/dispatch.py:* in _runcatch (glob)
107 */mercurial/dispatch.py:* in _runcatch (glob)
108 */mercurial/dispatch.py:* in _callcatch (glob)
108 */mercurial/dispatch.py:* in _callcatch (glob)
109 */mercurial/scmutil.py* in callcatch (glob)
109 */mercurial/scmutil.py* in callcatch (glob)
110 */mercurial/dispatch.py:* in _runcatchfunc (glob)
110 */mercurial/dispatch.py:* in _runcatchfunc (glob)
111 */mercurial/dispatch.py:* in _dispatch (glob)
111 */mercurial/dispatch.py:* in _dispatch (glob)
112 */mercurial/dispatch.py:* in runcommand (glob)
112 */mercurial/dispatch.py:* in runcommand (glob)
113 */mercurial/dispatch.py:* in _runcommand (glob)
113 */mercurial/dispatch.py:* in _runcommand (glob)
114 */mercurial/dispatch.py:* in <lambda> (glob)
114 */mercurial/dispatch.py:* in <lambda> (glob)
115 */mercurial/util.py:* in check (glob)
115 */mercurial/util.py:* in check (glob)
116 $TESTTMP/buggylocking.py:* in buggylocking (glob)
116 $TESTTMP/buggylocking.py:* in buggylocking (glob)
117 #else
117 #else
118 $ hg buggylocking --traceback
118 $ hg buggylocking --traceback
119 devel-warn: "wlock" acquired after "lock" at:
119 devel-warn: "wlock" acquired after "lock" at:
120 */hg:* in <module> (glob) (?)
120 */hg:* in <module> (glob) (?)
121 */mercurial/dispatch.py:* in run (glob)
121 */mercurial/dispatch.py:* in run (glob)
122 */mercurial/dispatch.py:* in dispatch (glob)
122 */mercurial/dispatch.py:* in dispatch (glob)
123 */mercurial/dispatch.py:* in _runcatch (glob)
123 */mercurial/dispatch.py:* in _runcatch (glob)
124 */mercurial/dispatch.py:* in _callcatch (glob)
124 */mercurial/dispatch.py:* in _callcatch (glob)
125 */mercurial/scmutil.py:* in callcatch (glob)
125 */mercurial/scmutil.py:* in callcatch (glob)
126 */mercurial/dispatch.py:* in _runcatchfunc (glob)
126 */mercurial/dispatch.py:* in _runcatchfunc (glob)
127 */mercurial/dispatch.py:* in _dispatch (glob)
127 */mercurial/dispatch.py:* in _dispatch (glob)
128 */mercurial/dispatch.py:* in runcommand (glob)
128 */mercurial/dispatch.py:* in runcommand (glob)
129 */mercurial/dispatch.py:* in _runcommand (glob)
129 */mercurial/dispatch.py:* in _runcommand (glob)
130 */mercurial/dispatch.py:* in <lambda> (glob)
130 */mercurial/dispatch.py:* in <lambda> (glob)
131 */mercurial/util.py:* in check (glob)
131 */mercurial/util.py:* in check (glob)
132 */mercurial/commands.py:* in serve (glob)
132 */mercurial/commands.py:* in serve (glob)
133 */mercurial/server.py:* in runservice (glob)
133 */mercurial/server.py:* in runservice (glob)
134 */mercurial/commandserver.py:* in run (glob)
134 */mercurial/commandserver.py:* in run (glob)
135 */mercurial/commandserver.py:* in _mainloop (glob)
135 */mercurial/commandserver.py:* in _mainloop (glob)
136 */mercurial/commandserver.py:* in _acceptnewconnection (glob)
136 */mercurial/commandserver.py:* in _runworker (glob)
137 */mercurial/commandserver.py:* in _runworker (glob)
137 */mercurial/commandserver.py:* in _serverequest (glob)
138 */mercurial/commandserver.py:* in _serverequest (glob)
138 */mercurial/commandserver.py:* in serve (glob)
139 */mercurial/commandserver.py:* in serve (glob)
139 */mercurial/commandserver.py:* in serveone (glob)
140 */mercurial/commandserver.py:* in serveone (glob)
140 */mercurial/chgserver.py:* in runcommand (glob)
141 */mercurial/chgserver.py:* in runcommand (glob)
141 */mercurial/commandserver.py:* in runcommand (glob)
142 */mercurial/commandserver.py:* in runcommand (glob)
142 */mercurial/dispatch.py:* in dispatch (glob)
143 */mercurial/dispatch.py:* in dispatch (glob)
143 */mercurial/dispatch.py:* in _runcatch (glob)
144 */mercurial/dispatch.py:* in _runcatch (glob)
144 */mercurial/dispatch.py:* in _callcatch (glob)
145 */mercurial/dispatch.py:* in _callcatch (glob)
145 */mercurial/scmutil.py:* in callcatch (glob)
146 */mercurial/scmutil.py:* in callcatch (glob)
146 */mercurial/dispatch.py:* in _runcatchfunc (glob)
147 */mercurial/dispatch.py:* in _runcatchfunc (glob)
147 */mercurial/dispatch.py:* in _dispatch (glob)
148 */mercurial/dispatch.py:* in _dispatch (glob)
148 */mercurial/dispatch.py:* in runcommand (glob)
149 */mercurial/dispatch.py:* in runcommand (glob)
149 */mercurial/dispatch.py:* in _runcommand (glob)
150 */mercurial/dispatch.py:* in _runcommand (glob)
150 */mercurial/dispatch.py:* in <lambda> (glob)
151 */mercurial/dispatch.py:* in <lambda> (glob)
151 */mercurial/util.py:* in check (glob)
152 */mercurial/util.py:* in check (glob)
152 $TESTTMP/buggylocking.py:* in buggylocking (glob)
153 $TESTTMP/buggylocking.py:* in buggylocking (glob)
153 #endif
154 #endif
154 $ hg properlocking
155 $ hg properlocking
155 $ hg nowaitlocking
156 $ hg nowaitlocking
156
157
157 Writing without lock
158 Writing without lock
158
159
159 $ hg no-wlock-write
160 $ hg no-wlock-write
160 devel-warn: write with no wlock: "branch" at: $TESTTMP/buggylocking.py:* (nowlockwrite) (glob)
161 devel-warn: write with no wlock: "branch" at: $TESTTMP/buggylocking.py:* (nowlockwrite) (glob)
161
162
162 $ hg no-lock-write
163 $ hg no-lock-write
163 devel-warn: write with no lock: "fncache" at: $TESTTMP/buggylocking.py:* (nolockwrite) (glob)
164 devel-warn: write with no lock: "fncache" at: $TESTTMP/buggylocking.py:* (nolockwrite) (glob)
164
165
165 Stripping from a transaction
166 Stripping from a transaction
166
167
167 $ echo a > a
168 $ echo a > a
168 $ hg add a
169 $ hg add a
169 $ hg commit -m a
170 $ hg commit -m a
170 $ hg stripintr 2>&1 | egrep -v '^(\*\*| )'
171 $ hg stripintr 2>&1 | egrep -v '^(\*\*| )'
171 Traceback (most recent call last):
172 Traceback (most recent call last):
172 *ProgrammingError: cannot strip from inside a transaction (glob)
173 *ProgrammingError: cannot strip from inside a transaction (glob)
173
174
174 $ hg oldanddeprecated
175 $ hg oldanddeprecated
175 devel-warn: foorbar is deprecated, go shopping
176 devel-warn: foorbar is deprecated, go shopping
176 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
177 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
177
178
178 #if no-chg
179 #if no-chg
179 $ hg oldanddeprecated --traceback
180 $ hg oldanddeprecated --traceback
180 devel-warn: foorbar is deprecated, go shopping
181 devel-warn: foorbar is deprecated, go shopping
181 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
182 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
182 */hg:* in <module> (glob) (?)
183 */hg:* in <module> (glob) (?)
183 */mercurial/dispatch.py:* in run (glob)
184 */mercurial/dispatch.py:* in run (glob)
184 */mercurial/dispatch.py:* in dispatch (glob)
185 */mercurial/dispatch.py:* in dispatch (glob)
185 */mercurial/dispatch.py:* in _runcatch (glob)
186 */mercurial/dispatch.py:* in _runcatch (glob)
186 */mercurial/dispatch.py:* in _callcatch (glob)
187 */mercurial/dispatch.py:* in _callcatch (glob)
187 */mercurial/scmutil.py* in callcatch (glob)
188 */mercurial/scmutil.py* in callcatch (glob)
188 */mercurial/dispatch.py:* in _runcatchfunc (glob)
189 */mercurial/dispatch.py:* in _runcatchfunc (glob)
189 */mercurial/dispatch.py:* in _dispatch (glob)
190 */mercurial/dispatch.py:* in _dispatch (glob)
190 */mercurial/dispatch.py:* in runcommand (glob)
191 */mercurial/dispatch.py:* in runcommand (glob)
191 */mercurial/dispatch.py:* in _runcommand (glob)
192 */mercurial/dispatch.py:* in _runcommand (glob)
192 */mercurial/dispatch.py:* in <lambda> (glob)
193 */mercurial/dispatch.py:* in <lambda> (glob)
193 */mercurial/util.py:* in check (glob)
194 */mercurial/util.py:* in check (glob)
194 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
195 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
195 #else
196 #else
196 $ hg oldanddeprecated --traceback
197 $ hg oldanddeprecated --traceback
197 devel-warn: foorbar is deprecated, go shopping
198 devel-warn: foorbar is deprecated, go shopping
198 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
199 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
199 */hg:* in <module> (glob)
200 */hg:* in <module> (glob)
200 */mercurial/dispatch.py:* in run (glob)
201 */mercurial/dispatch.py:* in run (glob)
201 */mercurial/dispatch.py:* in dispatch (glob)
202 */mercurial/dispatch.py:* in dispatch (glob)
202 */mercurial/dispatch.py:* in _runcatch (glob)
203 */mercurial/dispatch.py:* in _runcatch (glob)
203 */mercurial/dispatch.py:* in _callcatch (glob)
204 */mercurial/dispatch.py:* in _callcatch (glob)
204 */mercurial/scmutil.py:* in callcatch (glob)
205 */mercurial/scmutil.py:* in callcatch (glob)
205 */mercurial/dispatch.py:* in _runcatchfunc (glob)
206 */mercurial/dispatch.py:* in _runcatchfunc (glob)
206 */mercurial/dispatch.py:* in _dispatch (glob)
207 */mercurial/dispatch.py:* in _dispatch (glob)
207 */mercurial/dispatch.py:* in runcommand (glob)
208 */mercurial/dispatch.py:* in runcommand (glob)
208 */mercurial/dispatch.py:* in _runcommand (glob)
209 */mercurial/dispatch.py:* in _runcommand (glob)
209 */mercurial/dispatch.py:* in <lambda> (glob)
210 */mercurial/dispatch.py:* in <lambda> (glob)
210 */mercurial/util.py:* in check (glob)
211 */mercurial/util.py:* in check (glob)
211 */mercurial/commands.py:* in serve (glob)
212 */mercurial/commands.py:* in serve (glob)
212 */mercurial/server.py:* in runservice (glob)
213 */mercurial/server.py:* in runservice (glob)
213 */mercurial/commandserver.py:* in run (glob)
214 */mercurial/commandserver.py:* in run (glob)
214 */mercurial/commandserver.py:* in _mainloop (glob)
215 */mercurial/commandserver.py:* in _mainloop (glob)
216 */mercurial/commandserver.py:* in _acceptnewconnection (glob)
215 */mercurial/commandserver.py:* in _runworker (glob)
217 */mercurial/commandserver.py:* in _runworker (glob)
216 */mercurial/commandserver.py:* in _serverequest (glob)
218 */mercurial/commandserver.py:* in _serverequest (glob)
217 */mercurial/commandserver.py:* in serve (glob)
219 */mercurial/commandserver.py:* in serve (glob)
218 */mercurial/commandserver.py:* in serveone (glob)
220 */mercurial/commandserver.py:* in serveone (glob)
219 */mercurial/chgserver.py:* in runcommand (glob)
221 */mercurial/chgserver.py:* in runcommand (glob)
220 */mercurial/commandserver.py:* in runcommand (glob)
222 */mercurial/commandserver.py:* in runcommand (glob)
221 */mercurial/dispatch.py:* in dispatch (glob)
223 */mercurial/dispatch.py:* in dispatch (glob)
222 */mercurial/dispatch.py:* in _runcatch (glob)
224 */mercurial/dispatch.py:* in _runcatch (glob)
223 */mercurial/dispatch.py:* in _callcatch (glob)
225 */mercurial/dispatch.py:* in _callcatch (glob)
224 */mercurial/scmutil.py:* in callcatch (glob)
226 */mercurial/scmutil.py:* in callcatch (glob)
225 */mercurial/dispatch.py:* in _runcatchfunc (glob)
227 */mercurial/dispatch.py:* in _runcatchfunc (glob)
226 */mercurial/dispatch.py:* in _dispatch (glob)
228 */mercurial/dispatch.py:* in _dispatch (glob)
227 */mercurial/dispatch.py:* in runcommand (glob)
229 */mercurial/dispatch.py:* in runcommand (glob)
228 */mercurial/dispatch.py:* in _runcommand (glob)
230 */mercurial/dispatch.py:* in _runcommand (glob)
229 */mercurial/dispatch.py:* in <lambda> (glob)
231 */mercurial/dispatch.py:* in <lambda> (glob)
230 */mercurial/util.py:* in check (glob)
232 */mercurial/util.py:* in check (glob)
231 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
233 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
232 #endif
234 #endif
233
235
234 #if no-chg
236 #if no-chg
235 $ hg blackbox -l 7
237 $ hg blackbox -l 7
236 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated
238 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated
237 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
239 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
238 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
240 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
239 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob)
241 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob)
240 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback
242 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback
241 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
243 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
242 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
244 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
243 */hg:* in <module> (glob) (?)
245 */hg:* in <module> (glob) (?)
244 */mercurial/dispatch.py:* in run (glob)
246 */mercurial/dispatch.py:* in run (glob)
245 */mercurial/dispatch.py:* in dispatch (glob)
247 */mercurial/dispatch.py:* in dispatch (glob)
246 */mercurial/dispatch.py:* in _runcatch (glob)
248 */mercurial/dispatch.py:* in _runcatch (glob)
247 */mercurial/dispatch.py:* in _callcatch (glob)
249 */mercurial/dispatch.py:* in _callcatch (glob)
248 */mercurial/scmutil.py* in callcatch (glob)
250 */mercurial/scmutil.py* in callcatch (glob)
249 */mercurial/dispatch.py:* in _runcatchfunc (glob)
251 */mercurial/dispatch.py:* in _runcatchfunc (glob)
250 */mercurial/dispatch.py:* in _dispatch (glob)
252 */mercurial/dispatch.py:* in _dispatch (glob)
251 */mercurial/dispatch.py:* in runcommand (glob)
253 */mercurial/dispatch.py:* in runcommand (glob)
252 */mercurial/dispatch.py:* in _runcommand (glob)
254 */mercurial/dispatch.py:* in _runcommand (glob)
253 */mercurial/dispatch.py:* in <lambda> (glob)
255 */mercurial/dispatch.py:* in <lambda> (glob)
254 */mercurial/util.py:* in check (glob)
256 */mercurial/util.py:* in check (glob)
255 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
257 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
256 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob)
258 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob)
257 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7
259 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7
258 #else
260 #else
259 $ hg blackbox -l 7
261 $ hg blackbox -l 7
260 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated
262 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated
261 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
263 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
262 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
264 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
263 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob)
265 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob)
264 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback
266 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback
265 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
267 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
266 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
268 (compatibility will be dropped after Mercurial-42.1337, update your code.) at:
267 */hg:* in <module> (glob)
269 */hg:* in <module> (glob)
268 */mercurial/dispatch.py:* in run (glob)
270 */mercurial/dispatch.py:* in run (glob)
269 */mercurial/dispatch.py:* in dispatch (glob)
271 */mercurial/dispatch.py:* in dispatch (glob)
270 */mercurial/dispatch.py:* in _runcatch (glob)
272 */mercurial/dispatch.py:* in _runcatch (glob)
271 */mercurial/dispatch.py:* in _callcatch (glob)
273 */mercurial/dispatch.py:* in _callcatch (glob)
272 */mercurial/scmutil.py:* in callcatch (glob)
274 */mercurial/scmutil.py:* in callcatch (glob)
273 */mercurial/dispatch.py:* in _runcatchfunc (glob)
275 */mercurial/dispatch.py:* in _runcatchfunc (glob)
274 */mercurial/dispatch.py:* in _dispatch (glob)
276 */mercurial/dispatch.py:* in _dispatch (glob)
275 */mercurial/dispatch.py:* in runcommand (glob)
277 */mercurial/dispatch.py:* in runcommand (glob)
276 */mercurial/dispatch.py:* in _runcommand (glob)
278 */mercurial/dispatch.py:* in _runcommand (glob)
277 */mercurial/dispatch.py:* in <lambda> (glob)
279 */mercurial/dispatch.py:* in <lambda> (glob)
278 */mercurial/util.py:* in check (glob)
280 */mercurial/util.py:* in check (glob)
279 */mercurial/commands.py:* in serve (glob)
281 */mercurial/commands.py:* in serve (glob)
280 */mercurial/server.py:* in runservice (glob)
282 */mercurial/server.py:* in runservice (glob)
281 */mercurial/commandserver.py:* in run (glob)
283 */mercurial/commandserver.py:* in run (glob)
282 */mercurial/commandserver.py:* in _mainloop (glob)
284 */mercurial/commandserver.py:* in _mainloop (glob)
285 */mercurial/commandserver.py:* in _acceptnewconnection (glob)
283 */mercurial/commandserver.py:* in _runworker (glob)
286 */mercurial/commandserver.py:* in _runworker (glob)
284 */mercurial/commandserver.py:* in _serverequest (glob)
287 */mercurial/commandserver.py:* in _serverequest (glob)
285 */mercurial/commandserver.py:* in serve (glob)
288 */mercurial/commandserver.py:* in serve (glob)
286 */mercurial/commandserver.py:* in serveone (glob)
289 */mercurial/commandserver.py:* in serveone (glob)
287 */mercurial/chgserver.py:* in runcommand (glob)
290 */mercurial/chgserver.py:* in runcommand (glob)
288 */mercurial/commandserver.py:* in runcommand (glob)
291 */mercurial/commandserver.py:* in runcommand (glob)
289 */mercurial/dispatch.py:* in dispatch (glob)
292 */mercurial/dispatch.py:* in dispatch (glob)
290 */mercurial/dispatch.py:* in _runcatch (glob)
293 */mercurial/dispatch.py:* in _runcatch (glob)
291 */mercurial/dispatch.py:* in _callcatch (glob)
294 */mercurial/dispatch.py:* in _callcatch (glob)
292 */mercurial/scmutil.py:* in callcatch (glob)
295 */mercurial/scmutil.py:* in callcatch (glob)
293 */mercurial/dispatch.py:* in _runcatchfunc (glob)
296 */mercurial/dispatch.py:* in _runcatchfunc (glob)
294 */mercurial/dispatch.py:* in _dispatch (glob)
297 */mercurial/dispatch.py:* in _dispatch (glob)
295 */mercurial/dispatch.py:* in runcommand (glob)
298 */mercurial/dispatch.py:* in runcommand (glob)
296 */mercurial/dispatch.py:* in _runcommand (glob)
299 */mercurial/dispatch.py:* in _runcommand (glob)
297 */mercurial/dispatch.py:* in <lambda> (glob)
300 */mercurial/dispatch.py:* in <lambda> (glob)
298 */mercurial/util.py:* in check (glob)
301 */mercurial/util.py:* in check (glob)
299 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
302 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
300 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob)
303 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob)
301 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7
304 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7
302 #endif
305 #endif
303
306
304 Test programming error failure:
307 Test programming error failure:
305
308
306 $ hg buggytransaction 2>&1 | egrep -v '^ '
309 $ hg buggytransaction 2>&1 | egrep -v '^ '
307 ** Unknown exception encountered with possibly-broken third-party extension buggylocking
310 ** Unknown exception encountered with possibly-broken third-party extension buggylocking
308 ** which supports versions unknown of Mercurial.
311 ** which supports versions unknown of Mercurial.
309 ** Please disable buggylocking and try your action again.
312 ** Please disable buggylocking and try your action again.
310 ** If that fixes the bug please report it to the extension author.
313 ** If that fixes the bug please report it to the extension author.
311 ** Python * (glob)
314 ** Python * (glob)
312 ** Mercurial Distributed SCM (*) (glob)
315 ** Mercurial Distributed SCM (*) (glob)
313 ** Extensions loaded: * (glob)
316 ** Extensions loaded: * (glob)
314 ** ProgrammingError: transaction requires locking
317 ** ProgrammingError: transaction requires locking
315 Traceback (most recent call last):
318 Traceback (most recent call last):
316 *ProgrammingError: transaction requires locking (glob)
319 *ProgrammingError: transaction requires locking (glob)
317
320
318 $ hg programmingerror 2>&1 | egrep -v '^ '
321 $ hg programmingerror 2>&1 | egrep -v '^ '
319 ** Unknown exception encountered with possibly-broken third-party extension buggylocking
322 ** Unknown exception encountered with possibly-broken third-party extension buggylocking
320 ** which supports versions unknown of Mercurial.
323 ** which supports versions unknown of Mercurial.
321 ** Please disable buggylocking and try your action again.
324 ** Please disable buggylocking and try your action again.
322 ** If that fixes the bug please report it to the extension author.
325 ** If that fixes the bug please report it to the extension author.
323 ** Python * (glob)
326 ** Python * (glob)
324 ** Mercurial Distributed SCM (*) (glob)
327 ** Mercurial Distributed SCM (*) (glob)
325 ** Extensions loaded: * (glob)
328 ** Extensions loaded: * (glob)
326 ** ProgrammingError: something went wrong
329 ** ProgrammingError: something went wrong
327 ** (try again)
330 ** (try again)
328 Traceback (most recent call last):
331 Traceback (most recent call last):
329 *ProgrammingError: something went wrong (glob)
332 *ProgrammingError: something went wrong (glob)
330
333
331 Old style deprecation warning
334 Old style deprecation warning
332
335
333 $ hg nouiwarning
336 $ hg nouiwarning
334 $TESTTMP/buggylocking.py:*: DeprecationWarning: this is a test (glob)
337 $TESTTMP/buggylocking.py:*: DeprecationWarning: this is a test (glob)
335 (compatibility will be dropped after Mercurial-13.37, update your code.)
338 (compatibility will be dropped after Mercurial-13.37, update your code.)
336 util.nouideprecwarn(b'this is a test', b'13.37')
339 util.nouideprecwarn(b'this is a test', b'13.37')
337
340
338 (disabled outside of test run)
341 (disabled outside of test run)
339
342
340 $ HGEMITWARNINGS= hg nouiwarning
343 $ HGEMITWARNINGS= hg nouiwarning
341
344
342 Test warning on config option access and registration
345 Test warning on config option access and registration
343
346
344 $ cat << EOF > ${TESTTMP}/buggyconfig.py
347 $ cat << EOF > ${TESTTMP}/buggyconfig.py
345 > """A small extension that tests our developer warnings for config"""
348 > """A small extension that tests our developer warnings for config"""
346 >
349 >
347 > from mercurial import configitems, registrar
350 > from mercurial import configitems, registrar
348 >
351 >
349 > cmdtable = {}
352 > cmdtable = {}
350 > command = registrar.command(cmdtable)
353 > command = registrar.command(cmdtable)
351 >
354 >
352 > configtable = {}
355 > configtable = {}
353 > configitem = registrar.configitem(configtable)
356 > configitem = registrar.configitem(configtable)
354 >
357 >
355 > configitem(b'test', b'some', default=b'foo')
358 > configitem(b'test', b'some', default=b'foo')
356 > configitem(b'test', b'dynamic', default=configitems.dynamicdefault)
359 > configitem(b'test', b'dynamic', default=configitems.dynamicdefault)
357 > configitem(b'test', b'callable', default=list)
360 > configitem(b'test', b'callable', default=list)
358 > # overwrite a core config
361 > # overwrite a core config
359 > configitem(b'ui', b'quiet', default=False)
362 > configitem(b'ui', b'quiet', default=False)
360 > configitem(b'ui', b'interactive', default=None)
363 > configitem(b'ui', b'interactive', default=None)
361 >
364 >
362 > @command(b'buggyconfig')
365 > @command(b'buggyconfig')
363 > def cmdbuggyconfig(ui, repo):
366 > def cmdbuggyconfig(ui, repo):
364 > repo.ui.config(b'ui', b'quiet', True)
367 > repo.ui.config(b'ui', b'quiet', True)
365 > repo.ui.config(b'ui', b'interactive', False)
368 > repo.ui.config(b'ui', b'interactive', False)
366 > repo.ui.config(b'test', b'some', b'bar')
369 > repo.ui.config(b'test', b'some', b'bar')
367 > repo.ui.config(b'test', b'some', b'foo')
370 > repo.ui.config(b'test', b'some', b'foo')
368 > repo.ui.config(b'test', b'dynamic', b'some-required-default')
371 > repo.ui.config(b'test', b'dynamic', b'some-required-default')
369 > repo.ui.config(b'test', b'dynamic')
372 > repo.ui.config(b'test', b'dynamic')
370 > repo.ui.config(b'test', b'callable', [])
373 > repo.ui.config(b'test', b'callable', [])
371 > repo.ui.config(b'test', b'callable', b'foo')
374 > repo.ui.config(b'test', b'callable', b'foo')
372 > repo.ui.config(b'test', b'unregistered')
375 > repo.ui.config(b'test', b'unregistered')
373 > repo.ui.config(b'unregistered', b'unregistered')
376 > repo.ui.config(b'unregistered', b'unregistered')
374 > EOF
377 > EOF
375
378
376 $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig
379 $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig
377 devel-warn: extension 'buggyconfig' overwrite config item 'ui.interactive' at: */mercurial/extensions.py:* (_loadextra) (glob)
380 devel-warn: extension 'buggyconfig' overwrite config item 'ui.interactive' at: */mercurial/extensions.py:* (_loadextra) (glob)
378 devel-warn: extension 'buggyconfig' overwrite config item 'ui.quiet' at: */mercurial/extensions.py:* (_loadextra) (glob)
381 devel-warn: extension 'buggyconfig' overwrite config item 'ui.quiet' at: */mercurial/extensions.py:* (_loadextra) (glob)
379 devel-warn: specifying a mismatched default value for a registered config item: 'ui.quiet' 'True' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
382 devel-warn: specifying a mismatched default value for a registered config item: 'ui.quiet' 'True' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
380 devel-warn: specifying a mismatched default value for a registered config item: 'ui.interactive' 'False' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
383 devel-warn: specifying a mismatched default value for a registered config item: 'ui.interactive' 'False' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
381 devel-warn: specifying a mismatched default value for a registered config item: 'test.some' 'bar' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
384 devel-warn: specifying a mismatched default value for a registered config item: 'test.some' 'bar' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
382 devel-warn: config item requires an explicit default value: 'test.dynamic' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
385 devel-warn: config item requires an explicit default value: 'test.dynamic' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
383 devel-warn: specifying a mismatched default value for a registered config item: 'test.callable' 'foo' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
386 devel-warn: specifying a mismatched default value for a registered config item: 'test.callable' 'foo' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
384 devel-warn: accessing unregistered config item: 'test.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
387 devel-warn: accessing unregistered config item: 'test.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
385 devel-warn: accessing unregistered config item: 'unregistered.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
388 devel-warn: accessing unregistered config item: 'unregistered.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob)
386
389
387 $ cd ..
390 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now