changeset 10506:42afde35e9f7 stable

ui: suppress aliases when HGPLAIN is set
author Brodie Rao <me+hg@dackz.net>
date Thu, 18 Feb 2010 16:50:49 -0500
parents b3311e26f94f
children 79dd96774187
files mercurial/ui.py tests/test-hgrc tests/test-hgrc.out
diffstat 3 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Mon Feb 15 15:25:29 2010 -0500
+++ b/mercurial/ui.py	Thu Feb 18 16:50:49 2010 -0500
@@ -84,6 +84,8 @@
                       'verbose'):
                 if k in cfg['ui']:
                     del cfg['ui'][k]
+            for k, v in cfg.items('alias'):
+                del cfg['alias'][k]
             for k, v in cfg.items('defaults'):
                 del cfg['defaults'][k]
 
--- a/tests/test-hgrc	Mon Feb 15 15:25:29 2010 -0500
+++ b/tests/test-hgrc	Thu Feb 18 16:50:49 2010 -0500
@@ -37,6 +37,8 @@
 echo "verbose=true" >> $HGRCPATH
 echo "[defaults]" >> $HGRCPATH
 echo "identify=-n" >> $HGRCPATH
+echo "[alias]" >> $HGRCPATH
+echo "log=log -g" >> $HGRCPATH
 
 echo '% customized hgrc'
 hg showconfig | sed -e "s:$p:...:"
--- a/tests/test-hgrc.out	Mon Feb 15 15:25:29 2010 -0500
+++ b/tests/test-hgrc.out	Thu Feb 18 16:50:49 2010 -0500
@@ -11,6 +11,7 @@
 foo.baz=bif cb
 hg: config error at $HGRCPATH:1: cannot include /no-such-file (No such file or directory)
 % customized hgrc
+.../.hgrc:10: alias.log=log -g
 .../.hgrc:8: defaults.identify=-n
 .../.hgrc:2: ui.debug=true
 .../.hgrc:3: ui.fallbackencoding=ASCII