Show More
@@ -153,6 +153,16 b' class ui(object):' | |||
|
153 | 153 | "%s.%s = %s\n") % (section, name, uvalue)) |
|
154 | 154 | return value |
|
155 | 155 | |
|
156 | def configpath(self, section, name, default=None, untrusted=False): | |
|
157 | 'get a path config item, expanded relative to config file' | |
|
158 | v = self.config(section, name, default, untrusted) | |
|
159 | if not os.path.isabs(v) or "://" not in v: | |
|
160 | src = self.configsource(section, name, untrusted) | |
|
161 | if ':' in src: | |
|
162 | base = os.path.dirname(src.rsplit(':')) | |
|
163 | v = os.path.join(base, os.path.expanduser(v)) | |
|
164 | return v | |
|
165 | ||
|
156 | 166 | def configbool(self, section, name, default=False, untrusted=False): |
|
157 | 167 | v = self.config(section, name, None, untrusted) |
|
158 | 168 | if v is None: |
General Comments 0
You need to be logged in to leave comments.
Login now