ui: enable alias exception when reading config in plain mode
When in plain mode with "alias" present in the exception list,
keep the aliases. This will be used later to enable auto-completion.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
--- a/mercurial/ui.py Tue May 17 00:08:51 2011 +0200
+++ b/mercurial/ui.py Tue May 17 00:17:52 2011 +0200
@@ -82,10 +82,12 @@
'traceback', 'verbose'):
if k in cfg['ui']:
del cfg['ui'][k]
+ for k, v in cfg.items('defaults'):
+ del cfg['defaults'][k]
+ # Don't remove aliases from the configuration if in the exceptionlist
+ if self.plain('alias'):
for k, v in cfg.items('alias'):
del cfg['alias'][k]
- for k, v in cfg.items('defaults'):
- del cfg['defaults'][k]
if trusted:
self._tcfg.update(cfg)