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

login
register
mail settings
Submitter Pierre-Yves David
Date June 18, 2017, 6:55 p.m.
Message ID <a7036af610313c30e956.1497812118@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21487/
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 1497696722 -7200
#      Sat Jun 17 12:52:02 2017 +0200
# Node ID a7036af610313c30e956262d57f12931af60576e
# Parent  f3d6b4a73db3dc172b7ac2f30c84d4e509df22fe
# 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 a7036af61031
config: use the new '_unset' value for 'configpath'

This should let 'configpath' 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
@@ -455,7 +455,7 @@  class ui(object):
 
         return main, sub
 
-    def configpath(self, section, name, default=None, untrusted=False):
+    def configpath(self, section, name, default=_unset, untrusted=False):
         'get a path config item, expanded relative to repo root or config file'
         v = self.config(section, name, default, untrusted)
         if v is None: