[PATCH 10 of 10] config: use the new '_unset' value for 'configsuboptions'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Jun 18 14:55:20 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1497696697 -7200
#      Sat Jun 17 12:51:37 2017 +0200
# Node ID e61cd1328c8dd85d8e02a5519e028747074ff254
# Parent  d8629b5effa68c296e2da9bb8b6eb3ec3451793c
# EXP-Topic config.register
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r e61cd1328c8d
config: use the new '_unset' value for 'configsuboptions'

This should let configsuboptions delegate all special processing of the default
config value to the main 'config' method.

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -422,7 +422,7 @@ class ui(object):
                                "%s.%s = %s\n" % (section, n, uvalue))
         return value
 
-    def configsuboptions(self, section, name, default=None, untrusted=False):
+    def configsuboptions(self, section, name, default=_unset, untrusted=False):
         """Get a config option and all sub-options.
 
         Some config options have sub-options that are declared with the


More information about the Mercurial-devel mailing list