mercurial/ui.py
changeset 19536 ab3cf67740d6
parent 19226 c58b6ab4c26f
child 19886 e828975722c8
equal deleted inserted replaced
19535:df2155ebf502 19536:ab3cf67740d6
   174             alternates = name
   174             alternates = name
   175         else:
   175         else:
   176             alternates = [name]
   176             alternates = [name]
   177 
   177 
   178         for n in alternates:
   178         for n in alternates:
   179             value = self._data(untrusted).get(section, name, None)
   179             value = self._data(untrusted).get(section, n, None)
   180             if value is not None:
   180             if value is not None:
   181                 name = n
   181                 name = n
   182                 break
   182                 break
   183         else:
   183         else:
   184             value = default
   184             value = default
   185 
   185 
   186         if self.debugflag and not untrusted and self._reportuntrusted:
   186         if self.debugflag and not untrusted and self._reportuntrusted:
   187             uvalue = self._ucfg.get(section, name)
   187             for n in alternates:
   188             if uvalue is not None and uvalue != value:
   188                 uvalue = self._ucfg.get(section, n)
   189                 self.debug("ignoring untrusted configuration option "
   189                 if uvalue is not None and uvalue != value:
   190                            "%s.%s = %s\n" % (section, name, uvalue))
   190                     self.debug("ignoring untrusted configuration option "
       
   191                                "%s.%s = %s\n" % (section, n, uvalue))
   191         return value
   192         return value
   192 
   193 
   193     def configpath(self, section, name, default=None, untrusted=False):
   194     def configpath(self, section, name, default=None, untrusted=False):
   194         'get a path config item, expanded relative to repo root or config file'
   195         'get a path config item, expanded relative to repo root or config file'
   195         v = self.config(section, name, default, untrusted)
   196         v = self.config(section, name, default, untrusted)