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

login
register
mail settings
Submitter Pierre-Yves David
Date June 18, 2017, 6:55 p.m.
Message ID <e61cd1328c8dd85d8e02.1497812120@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21489/
State Accepted
Headers show

Comments

Pierre-Yves David - June 18, 2017, 6:55 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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