Show More
@@ -169,16 +169,7 b' def reachableroots(repo, roots, heads, i' | |||||
169 | def getset(repo, subset, x): |
|
169 | def getset(repo, subset, x): | |
170 | if not x: |
|
170 | if not x: | |
171 | raise error.ParseError(_("missing argument")) |
|
171 | raise error.ParseError(_("missing argument")) | |
172 |
|
|
172 | return 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) |
|
|||
182 |
|
173 | |||
183 | def _getrevsource(repo, r): |
|
174 | def _getrevsource(repo, r): | |
184 | extra = repo[r].extra() |
|
175 | extra = repo[r].extra() |
@@ -3,7 +3,7 b'' | |||||
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 |
|
6 | > from mercurial import cmdutil, repair | |
7 | > |
|
7 | > | |
8 | > cmdtable = {} |
|
8 | > cmdtable = {} | |
9 | > command = cmdutil.command(cmdtable) |
|
9 | > command = cmdutil.command(cmdtable) | |
@@ -58,11 +58,6 b'' | |||||
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 | |
@@ -111,10 +106,6 b'' | |||||
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) | |
@@ -135,10 +126,7 b'' | |||||
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 |
|
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) | |
@@ -160,7 +148,7 b'' | |||||
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 |
|
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 |
General Comments 0
You need to be logged in to leave comments.
Login now