Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 29146:b175d9cc3ee8
devel: officially deprecate old style revset
When we introduce the develwarning, we did not had an official deprecation API
and infrastructure. We can now officially deprecate the old way with a version
deadline.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 11 May 2016 09:31:47 +0200 |
parents | 64c1955a0461 |
children | ff07da10de4c |
comparison
equal
deleted
inserted
replaced
29145:c641b8dfb98c | 29146:b175d9cc3ee8 |
---|---|
331 if util.safehasattr(s, 'isascending'): | 331 if util.safehasattr(s, 'isascending'): |
332 return s | 332 return s |
333 # else case should not happen, because all non-func are internal, | 333 # else case should not happen, because all non-func are internal, |
334 # ignoring for now. | 334 # ignoring for now. |
335 if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols: | 335 if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols: |
336 repo.ui.develwarn('revset "%s" use list instead of smartset, ' | 336 repo.ui.deprecwarn('revset "%s" use list instead of smartset' |
337 '(upgrade your code)' % x[1][1], | 337 % x[1][1], |
338 config='old-revset') | 338 '3.9') |
339 return baseset(s) | 339 return baseset(s) |
340 | 340 |
341 def _getrevsource(repo, r): | 341 def _getrevsource(repo, r): |
342 extra = repo[r].extra() | 342 extra = repo[r].extra() |
343 for label in ('source', 'transplant_source', 'rebase_source'): | 343 for label in ('source', 'transplant_source', 'rebase_source'): |