diff mercurial/ui.py @ 34858:85a2db47ad50

configitems: adds a developer warning when accessing undeclared configuration Now that all known options are declared, we setup a warning to make sure it will stay this way. We disable the warning in two tests checking other behavior with random options.
author Boris Feld <boris.feld@octobus.net>
date Mon, 16 Oct 2017 17:41:27 +0200
parents 9f2891fb426c
children e9f320a40b44
line wrap: on
line diff
--- a/mercurial/ui.py	Tue Oct 17 21:15:31 2017 +0200
+++ b/mercurial/ui.py	Mon Oct 16 17:41:27 2017 +0200
@@ -477,6 +477,10 @@
 
         if item is not None:
             alternates.extend(item.alias)
+        else:
+            msg = ("accessing unregistered config item: '%s.%s'")
+            msg %= (section, name)
+            self.develwarn(msg, 2, 'warn-config-unknown')
 
         if default is _unset:
             if item is None: