Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Jun 19 11:19:45 2015 -0700 +++ b/mercurial/revset.py Fri Jun 19 11:17:11 2015 -0700 @@ -321,6 +321,13 @@ s = methods[x[0]](repo, subset, *x[1:]) if util.safehasattr(s, 'isascending'): return s + if (repo.ui.configbool('devel', 'all-warnings') + or repo.ui.configbool('devel', 'old-revset')): + # else case should not happen, because all non-func are internal, + # ignoring for now. + if x[0] == 'func' and x[1][0] == 'symbol' and x[1][1] in symbols: + repo.ui.develwarn('revset "%s" use list instead of smartset, ' + '(upgrade your code)' % x[1][1]) return baseset(s) def _getrevsource(repo, r):