From patchwork Thu Nov 23 03:35:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1494: develwarn: do not emit warning if "config" is unspecified From: phabricator X-Patchwork-Id: 25727 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Thu, 23 Nov 2017 03:35:26 +0000 spectral created this revision. spectral added a reviewer: yuja. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY 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. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1494 AFFECTED FILES mercurial/ui.py CHANGE DETAILS To: spectral, yuja, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1601,7 +1601,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