Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 25630:c88082baf693
devel-warn: issue a warning for old style revsets
We have move to smartset class more than a year ago, we now have the tool to
aggressively nudge developer into upgrading their extensions.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 19 Jun 2015 11:17:11 -0700 |
parents | 85294076adce |
children | 015c0d1087a3 |
comparison
equal
deleted
inserted
replaced
25629:52e5f68d8363 | 25630:c88082baf693 |
---|---|
319 if not x: | 319 if not x: |
320 raise error.ParseError(_("missing argument")) | 320 raise error.ParseError(_("missing argument")) |
321 s = methods[x[0]](repo, subset, *x[1:]) | 321 s = methods[x[0]](repo, subset, *x[1:]) |
322 if util.safehasattr(s, 'isascending'): | 322 if util.safehasattr(s, 'isascending'): |
323 return s | 323 return s |
324 if (repo.ui.configbool('devel', 'all-warnings') | |
325 or repo.ui.configbool('devel', 'old-revset')): | |
326 # else case should not happen, because all non-func are internal, | |
327 # ignoring for now. | |
328 if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols: | |
329 repo.ui.develwarn('revset "%s" use list instead of smartset, ' | |
330 '(upgrade your code)' % x[1][1]) | |
324 return baseset(s) | 331 return baseset(s) |
325 | 332 |
326 def _getrevsource(repo, r): | 333 def _getrevsource(repo, r): |
327 extra = repo[r].extra() | 334 extra = repo[r].extra() |
328 for label in ('source', 'transplant_source', 'rebase_source'): | 335 for label in ('source', 'transplant_source', 'rebase_source'): |