comparison tests/test-devel-warnings.t @ 31809:35b8bb1ef02b

revset: stop supporting predicate that returns plain list (API) It's said to be removed after 3.9.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 02 Apr 2017 22:01:32 +0900
parents 5646d7bcd823
children cc70c6dbac30
comparison
equal deleted inserted replaced
31808:ca3b4a2b7e54 31809:35b8bb1ef02b
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 cmdutil, repair, revset 6 > from mercurial import cmdutil, repair
7 > 7 >
8 > cmdtable = {} 8 > cmdtable = {}
9 > command = cmdutil.command(cmdtable) 9 > command = cmdutil.command(cmdtable)
10 > 10 >
11 > @command('buggylocking', [], '') 11 > @command('buggylocking', [], '')
56 > def oldanddeprecated(ui, repo): 56 > def oldanddeprecated(ui, repo):
57 > """test deprecation warning API""" 57 > """test deprecation warning API"""
58 > def foobar(ui): 58 > def foobar(ui):
59 > ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337') 59 > ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337')
60 > foobar(ui) 60 > foobar(ui)
61 >
62 > def oldstylerevset(repo, subset, x):
63 > return list(subset)
64 >
65 > revset.symbols['oldstyle'] = oldstylerevset
66 > EOF 61 > EOF
67 62
68 $ cat << EOF >> $HGRCPATH 63 $ cat << EOF >> $HGRCPATH
69 > [extensions] 64 > [extensions]
70 > buggylocking=$TESTTMP/buggylocking.py 65 > buggylocking=$TESTTMP/buggylocking.py
109 $ hg stripintr 2>&1 | egrep -v '^(\*\*| )' 104 $ hg stripintr 2>&1 | egrep -v '^(\*\*| )'
110 saved backup bundle to $TESTTMP/lock-checker/.hg/strip-backup/*-backup.hg (glob) 105 saved backup bundle to $TESTTMP/lock-checker/.hg/strip-backup/*-backup.hg (glob)
111 Traceback (most recent call last): 106 Traceback (most recent call last):
112 mercurial.error.ProgrammingError: cannot strip from inside a transaction 107 mercurial.error.ProgrammingError: cannot strip from inside a transaction
113 108
114 $ hg log -r "oldstyle()" -T '{rev}\n'
115 devel-warn: revset "oldstyle" uses list instead of smartset
116 (compatibility will be dropped after Mercurial-3.9, update your code.) at: *mercurial/revset.py:* (mfunc) (glob)
117 0
118 $ hg oldanddeprecated 109 $ hg oldanddeprecated
119 devel-warn: foorbar is deprecated, go shopping 110 devel-warn: foorbar is deprecated, go shopping
120 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob) 111 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
121 112
122 $ hg oldanddeprecated --traceback 113 $ hg oldanddeprecated --traceback
133 */mercurial/dispatch.py:* in runcommand (glob) 124 */mercurial/dispatch.py:* in runcommand (glob)
134 */mercurial/dispatch.py:* in _runcommand (glob) 125 */mercurial/dispatch.py:* in _runcommand (glob)
135 */mercurial/dispatch.py:* in <lambda> (glob) 126 */mercurial/dispatch.py:* in <lambda> (glob)
136 */mercurial/util.py:* in check (glob) 127 */mercurial/util.py:* in check (glob)
137 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) 128 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
138 $ hg blackbox -l 9 129 $ hg blackbox -l 7
139 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: revset "oldstyle" uses list instead of smartset
140 (compatibility will be dropped after Mercurial-3.9, update your code.) at: *mercurial/revset.py:* (mfunc) (glob)
141 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> log -r *oldstyle()* -T *{rev}\n* exited 0 after * seconds (glob)
142 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated 130 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated
143 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping 131 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
144 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob) 132 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
145 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob) 133 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob)
146 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback 134 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback
158 */mercurial/dispatch.py:* in _runcommand (glob) 146 */mercurial/dispatch.py:* in _runcommand (glob)
159 */mercurial/dispatch.py:* in <lambda> (glob) 147 */mercurial/dispatch.py:* in <lambda> (glob)
160 */mercurial/util.py:* in check (glob) 148 */mercurial/util.py:* in check (glob)
161 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) 149 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
162 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob) 150 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob)
163 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 9 151 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7
164 152
165 Test programming error failure: 153 Test programming error failure:
166 154
167 $ hg buggytransaction 2>&1 | egrep -v '^ ' 155 $ hg buggytransaction 2>&1 | egrep -v '^ '
168 ** Unknown exception encountered with possibly-broken third-party extension buggylocking 156 ** Unknown exception encountered with possibly-broken third-party extension buggylocking