Mercurial > hg-stable
changeset 35148:fa2395db68c6
develwarn: do not emit warning if "config" is unspecified
Previously, if the develwarn call site did not specify the category of warning,
and devel.all-warnings was False, it would emit the warning. If it was
intended that this emit a warning if config is unspecified, I would have
expected a comment, so I assumed this was unintentional and am changing the
behavior.
Differential Revision: https://phab.mercurial-scm.org/D1494
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Wed, 22 Nov 2017 19:24:22 -0800 |
parents | a9cc233de513 |
children | fd8b6b183073 |
files | mercurial/ui.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/ui.py Sat Oct 28 19:03:23 2017 +0530 +++ b/mercurial/ui.py Wed Nov 22 19:24:22 2017 -0800 @@ -1603,7 +1603,7 @@ stack. """ if not self.configbool('devel', 'all-warnings'): - if config is not None and not self.configbool('devel', config): + if config is None or not self.configbool('devel', config): return msg = 'devel-warn: ' + msg stacklevel += 1 # get in develwarn