diff tests/test-hgrc @ 10455:40dfd46d098f

ui: add HGPLAIN environment variable for easier scripting If HGPLAIN is set, the following settings are ignored when read from hgrc files: - ui.debug - ui.fallbackencoding - ui.quiet - ui.traceback - ui.verbose - defaults.* Localization is also disabled. Equivalent options set via command line are honored.
author Brodie Rao <me+hg@dackz.net>
date Sun, 07 Feb 2010 14:56:18 +0100
parents cade47dcac2d
children 42afde35e9f7
line wrap: on
line diff
--- a/tests/test-hgrc	Sat Feb 13 23:24:27 2010 -0600
+++ b/tests/test-hgrc	Sun Feb 07 14:56:18 2010 +0100
@@ -25,3 +25,22 @@
 
 echo '%include /no-such-file' > $HGRCPATH
 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
+
+# HGPLAIN
+cd ..
+p=`pwd`
+echo "[ui]" > $HGRCPATH
+echo "debug=true" >> $HGRCPATH
+echo "fallbackencoding=ASCII" >> $HGRCPATH
+echo "quiet=true" >> $HGRCPATH
+echo "traceback=true" >> $HGRCPATH
+echo "verbose=true" >> $HGRCPATH
+echo "[defaults]" >> $HGRCPATH
+echo "identify=-n" >> $HGRCPATH
+
+echo '% customized hgrc'
+hg showconfig | sed -e "s:$p:...:"
+
+echo '% plain hgrc'
+HGPLAIN=; export HGPLAIN
+hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:"