ui: ignore ui.logtemplate and ui.style when HGPLAIN is set stable
authorYuya Nishihara <yuya@tcha.org>
Wed, 03 Mar 2010 00:12:05 +0900
branchstable
changeset 10567 992723445a29
parent 10566 70dea42c9406
child 10570 fb20362f9782
ui: ignore ui.logtemplate and ui.style when HGPLAIN is set HGPLAIN should suppress them because they change Mercurial's default output.
mercurial/ui.py
tests/test-hgrc
tests/test-hgrc.out
--- a/mercurial/ui.py	Tue Mar 02 10:40:58 2010 +0100
+++ b/mercurial/ui.py	Wed Mar 03 00:12:05 2010 +0900
@@ -81,6 +81,7 @@
 
         if self.plain():
             for k in ('debug', 'fallbackencoding', 'quiet', 'slash',
+                      'logtemplate', 'style',
                       'traceback', 'verbose'):
                 if k in cfg['ui']:
                     del cfg['ui'][k]
--- a/tests/test-hgrc	Tue Mar 02 10:40:58 2010 +0100
+++ b/tests/test-hgrc	Wed Mar 03 00:12:05 2010 +0900
@@ -36,6 +36,8 @@
 echo "slash=true" >> $HGRCPATH
 echo "traceback=true" >> $HGRCPATH
 echo "verbose=true" >> $HGRCPATH
+echo "style=~/.hgstyle" >> $HGRCPATH
+echo "logtemplate={node}" >> $HGRCPATH
 echo "[defaults]" >> $HGRCPATH
 echo "identify=-n" >> $HGRCPATH
 echo "[alias]" >> $HGRCPATH
--- a/tests/test-hgrc.out	Tue Mar 02 10:40:58 2010 +0100
+++ b/tests/test-hgrc.out	Wed Mar 03 00:12:05 2010 +0900
@@ -11,14 +11,16 @@
 foo.baz=bif cb
 hg: config error at $HGRCPATH:1: cannot include /no-such-file (No such file or directory)
 % customized hgrc
-.../.hgrc:11: alias.log=log -g
-.../.hgrc:9: defaults.identify=-n
+.../.hgrc:13: alias.log=log -g
+.../.hgrc:11: defaults.identify=-n
 .../.hgrc:2: ui.debug=true
 .../.hgrc:3: ui.fallbackencoding=ASCII
 .../.hgrc:4: ui.quiet=true
 .../.hgrc:5: ui.slash=true
 .../.hgrc:6: ui.traceback=true
 .../.hgrc:7: ui.verbose=true
+.../.hgrc:8: ui.style=~/.hgstyle
+.../.hgrc:9: ui.logtemplate={node}
 % plain hgrc
 none: ui.traceback=True
 none: ui.verbose=False