##// END OF EJS Templates
ui: optionally ignore sub-options from configitems()...
Gregory Szorc -
r27253:f43988e5 default
parent child Browse files
Show More
@@ -510,8 +510,14 b' class ui(object):'
510 '''tell whether section exists in config.'''
510 '''tell whether section exists in config.'''
511 return section in self._data(untrusted)
511 return section in self._data(untrusted)
512
512
513 def configitems(self, section, untrusted=False):
513 def configitems(self, section, untrusted=False, ignoresub=False):
514 items = self._data(untrusted).items(section)
514 items = self._data(untrusted).items(section)
515 if ignoresub:
516 newitems = {}
517 for k, v in items:
518 if ':' not in k:
519 newitems[k] = v
520 items = newitems.items()
515 if self.debugflag and not untrusted and self._reportuntrusted:
521 if self.debugflag and not untrusted and self._reportuntrusted:
516 for k, v in self._ucfg.items(section):
522 for k, v in self._ucfg.items(section):
517 if self._tcfg.get(section, k) != v:
523 if self._tcfg.get(section, k) != v:
General Comments 0
You need to be logged in to leave comments. Login now