comparison 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
comparison
equal deleted inserted replaced
10454:37b735d27347 10455:40dfd46d098f
23 > $HGRCPATH 23 > $HGRCPATH
24 hg showconfig foo 24 hg showconfig foo
25 25
26 echo '%include /no-such-file' > $HGRCPATH 26 echo '%include /no-such-file' > $HGRCPATH
27 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" 27 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
28
29 # HGPLAIN
30 cd ..
31 p=`pwd`
32 echo "[ui]" > $HGRCPATH
33 echo "debug=true" >> $HGRCPATH
34 echo "fallbackencoding=ASCII" >> $HGRCPATH
35 echo "quiet=true" >> $HGRCPATH
36 echo "traceback=true" >> $HGRCPATH
37 echo "verbose=true" >> $HGRCPATH
38 echo "[defaults]" >> $HGRCPATH
39 echo "identify=-n" >> $HGRCPATH
40
41 echo '% customized hgrc'
42 hg showconfig | sed -e "s:$p:...:"
43
44 echo '% plain hgrc'
45 HGPLAIN=; export HGPLAIN
46 hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:"