Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 8182:b97abc7c1135
showconfig: show source file and line with --debug
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Apr 2009 16:50:43 -0500 |
parents | c8cb471fc9c2 |
children | d2504744e7a5 |
comparison
equal
deleted
inserted
replaced
8181:03d93882fc93 | 8182:b97abc7c1135 |
---|---|
148 | 148 |
149 def _get_cdata(self, untrusted): | 149 def _get_cdata(self, untrusted): |
150 if untrusted: | 150 if untrusted: |
151 return self.ucdata | 151 return self.ucdata |
152 return self.cdata | 152 return self.cdata |
153 | |
154 def configsource(self, section, name, untrusted=False): | |
155 return self._get_cdata(untrusted).getsource(section, name) or 'none' | |
153 | 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: |
157 uvalue = self.ucdata.get(section, name) | 160 uvalue = self.ucdata.get(section, name) |