##// END OF EJS Templates
revset: stop supporting predicate that returns plain list (API)...
Yuya Nishihara -
r31809:35b8bb1e default
parent child Browse files
Show More
@@ -169,16 +169,7 b' def reachableroots(repo, roots, heads, i'
169 169 def getset(repo, subset, x):
170 170 if not x:
171 171 raise error.ParseError(_("missing argument"))
172 s = methods[x[0]](repo, subset, *x[1:])
173 if util.safehasattr(s, 'isascending'):
174 return s
175 # else case should not happen, because all non-func are internal,
176 # ignoring for now.
177 if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols:
178 repo.ui.deprecwarn('revset "%s" uses list instead of smartset'
179 % x[1][1],
180 '3.9')
181 return baseset(s)
172 return methods[x[0]](repo, subset, *x[1:])
182 173
183 174 def _getrevsource(repo, r):
184 175 extra = repo[r].extra()
@@ -3,7 +3,7 b''
3 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 8 > cmdtable = {}
9 9 > command = cmdutil.command(cmdtable)
@@ -58,11 +58,6 b''
58 58 > def foobar(ui):
59 59 > ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337')
60 60 > foobar(ui)
61 >
62 > def oldstylerevset(repo, subset, x):
63 > return list(subset)
64 >
65 > revset.symbols['oldstyle'] = oldstylerevset
66 61 > EOF
67 62
68 63 $ cat << EOF >> $HGRCPATH
@@ -111,10 +106,6 b''
111 106 Traceback (most recent call last):
112 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 109 $ hg oldanddeprecated
119 110 devel-warn: foorbar is deprecated, go shopping
120 111 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
@@ -135,10 +126,7 b''
135 126 */mercurial/dispatch.py:* in <lambda> (glob)
136 127 */mercurial/util.py:* in check (glob)
137 128 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
138 $ hg blackbox -l 9
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)
129 $ hg blackbox -l 7
142 130 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated
143 131 1970/01/01 00:00:00 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping
144 132 (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob)
@@ -160,7 +148,7 b''
160 148 */mercurial/util.py:* in check (glob)
161 149 $TESTTMP/buggylocking.py:* in oldanddeprecated (glob)
162 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 153 Test programming error failure:
166 154
General Comments 0
You need to be logged in to leave comments. Login now