devel: use the new 'config' argument for the revset develwarn
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sun, 08 May 2016 10:43:41 +0200
changeset 29098 2822e9a5263b
parent 29097 ff4cc44364e3
child 29099 bdc86e178255
devel: use the new 'config' argument for the revset develwarn
mercurial/revset.py
--- a/mercurial/revset.py	Sun May 08 10:43:41 2016 +0200
+++ b/mercurial/revset.py	Sun May 08 10:43:41 2016 +0200
@@ -330,13 +330,12 @@
     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])
+    # 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],
+                          config='old-revset')
     return baseset(s)
 
 def _getrevsource(repo, r):