[PATCH 4 of 7] devel: use the new 'config' argument for the revset develwarn
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu May 5 13:05:54 EDT 2016
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1462457036 -7200
# Thu May 05 16:03:56 2016 +0200
# Node ID d671ff0fad1cabc27f586978593ce956d8611e78
# Parent 32b36022d50653b1d73e20905933081f29f88d24
# EXP-Topic develwarn
devel: use the new 'config' argument for the revset develwarn
diff -r 32b36022d506 -r d671ff0fad1c mercurial/revset.py
--- a/mercurial/revset.py Thu May 05 18:29:13 2016 +0200
+++ b/mercurial/revset.py Thu May 05 16:03:56 2016 +0200
@@ -330,13 +330,12 @@ def getset(repo, subset, x):
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):
More information about the Mercurial-devel
mailing list