comparison mercurial/ui.py @ 32983:36e16797df32

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 17 Jun 2017 12:52:02 +0200
parents 6599b7372387
children 61a8321c9962
comparison
equal deleted inserted replaced
32982:6599b7372387 32983:36e16797df32
491 self.debug('ignoring untrusted configuration option ' 491 self.debug('ignoring untrusted configuration option '
492 '%s:%s.%s = %s\n' % (section, name, k, uvalue)) 492 '%s:%s.%s = %s\n' % (section, name, k, uvalue))
493 493
494 return main, sub 494 return main, sub
495 495
496 def configpath(self, section, name, default=None, untrusted=False): 496 def configpath(self, section, name, default=_unset, untrusted=False):
497 'get a path config item, expanded relative to repo root or config file' 497 'get a path config item, expanded relative to repo root or config file'
498 v = self.config(section, name, default, untrusted) 498 v = self.config(section, name, default, untrusted)
499 if v is None: 499 if v is None:
500 return None 500 return None
501 if not os.path.isabs(v) or "://" not in v: 501 if not os.path.isabs(v) or "://" not in v: