From patchwork Sun Jun 18 18:55:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [04,of,10] config: use the new '_unset' value for 'configint' From: Pierre-Yves David X-Patchwork-Id: 21483 Message-Id: <11f995470103d355c41e.1497812114@nodosa.octopoid.net> To: mercurial-devel@mercurial-scm.org Cc: Gregory Szorc Date: Sun, 18 Jun 2017 20:55:14 +0200 # HG changeset patch # User Pierre-Yves David # Date 1497696820 -7200 # Sat Jun 17 12:53:40 2017 +0200 # Node ID 11f995470103d355c41e2bfc7b37160175f026cd # Parent 3984cb4c86deba1c255208f6c2e4a98f4aff227b # 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 11f995470103 config: use the new '_unset' value for 'configint' This should let 'configint' delegates 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 @@ -536,7 +536,7 @@ class ui(object): raise error.ConfigError(_("%s.%s is not a valid %s ('%s')") % (section, name, desc, v)) - def configint(self, section, name, default=None, untrusted=False): + def configint(self, section, name, default=_unset, untrusted=False): """parse a configuration element as an integer >>> u = ui(); s = 'foo'