Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 29412:b62bce819d0c
ui: don't fixup [paths] sub-options
As part of developing a subsequent patch I discovered that sub-option
values like "." were getting converted to paths. This is because the
[paths] section is treated specially during config loading.
This patch prevents post-processing sub-options from the [paths]
section.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 25 Jun 2016 18:35:14 -0700 |
parents | fea71f66ebff |
children | 31d3ab7985b8 |
comparison
equal
deleted
inserted
replaced
29411:e1778b9c8d53 | 29412:b62bce819d0c |
---|---|
226 # expand vars and ~ | 226 # expand vars and ~ |
227 # translate paths relative to root (or home) into absolute paths | 227 # translate paths relative to root (or home) into absolute paths |
228 root = root or os.getcwd() | 228 root = root or os.getcwd() |
229 for c in self._tcfg, self._ucfg, self._ocfg: | 229 for c in self._tcfg, self._ucfg, self._ocfg: |
230 for n, p in c.items('paths'): | 230 for n, p in c.items('paths'): |
231 # Ignore sub-options. | |
232 if ':' in n: | |
233 continue | |
231 if not p: | 234 if not p: |
232 continue | 235 continue |
233 if '%%' in p: | 236 if '%%' in p: |
234 self.warn(_("(deprecated '%%' in path %s=%s from %s)\n") | 237 self.warn(_("(deprecated '%%' in path %s=%s from %s)\n") |
235 % (n, p, self.configsource('paths', n))) | 238 % (n, p, self.configsource('paths', n))) |