Show More
@@ -797,10 +797,16 b' def showconfig(ui, repo, *values, **opts' | |||||
797 | if values: |
|
797 | if values: | |
798 | for v in values: |
|
798 | for v in values: | |
799 | if v == section: |
|
799 | if v == section: | |
|
800 | ui.debug('%s: ' % | |||
|
801 | ui.configsource(section, name, untrusted)) | |||
800 | ui.write('%s=%s\n' % (sectname, value)) |
|
802 | ui.write('%s=%s\n' % (sectname, value)) | |
801 | elif v == sectname: |
|
803 | elif v == sectname: | |
|
804 | ui.debug('%s: ' % | |||
|
805 | ui.configsource(section, name, untrusted)) | |||
802 | ui.write(value, '\n') |
|
806 | ui.write(value, '\n') | |
803 | else: |
|
807 | else: | |
|
808 | ui.debug('%s: ' % | |||
|
809 | ui.configsource(section, name, untrusted)) | |||
804 | ui.write('%s=%s\n' % (sectname, value)) |
|
810 | ui.write('%s=%s\n' % (sectname, value)) | |
805 |
|
811 | |||
806 | def debugsetparents(ui, repo, rev1, rev2=None): |
|
812 | def debugsetparents(ui, repo, rev1, rev2=None): |
@@ -151,6 +151,9 b' class ui(object):' | |||||
151 | return self.ucdata |
|
151 | return self.ucdata | |
152 | return self.cdata |
|
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 | def config(self, section, name, default=None, untrusted=False): |
|
157 | def config(self, section, name, default=None, untrusted=False): | |
155 | value = self._get_cdata(untrusted).get(section, name, default) |
|
158 | value = self._get_cdata(untrusted).get(section, name, default) | |
156 | if self.debugflag and not untrusted: |
|
159 | if self.debugflag and not untrusted: |
General Comments 0
You need to be logged in to leave comments.
Login now