##// END OF EJS Templates
showconfig: show source file and line with --debug
Matt Mackall -
r8182:b97abc7c default
parent child Browse files
Show More
@@ -797,10 +797,16 b' def showconfig(ui, repo, *values, **opts'
797 797 if values:
798 798 for v in values:
799 799 if v == section:
800 ui.debug('%s: ' %
801 ui.configsource(section, name, untrusted))
800 802 ui.write('%s=%s\n' % (sectname, value))
801 803 elif v == sectname:
804 ui.debug('%s: ' %
805 ui.configsource(section, name, untrusted))
802 806 ui.write(value, '\n')
803 807 else:
808 ui.debug('%s: ' %
809 ui.configsource(section, name, untrusted))
804 810 ui.write('%s=%s\n' % (sectname, value))
805 811
806 812 def debugsetparents(ui, repo, rev1, rev2=None):
@@ -151,6 +151,9 b' class ui(object):'
151 151 return self.ucdata
152 152 return self.cdata
153 153
154 def configsource(self, section, name, untrusted=False):
155 return self._get_cdata(untrusted).getsource(section, name) or 'none'
156
154 157 def config(self, section, name, default=None, untrusted=False):
155 158 value = self._get_cdata(untrusted).get(section, name, default)
156 159 if self.debugflag and not untrusted:
General Comments 0
You need to be logged in to leave comments. Login now