##// END OF EJS Templates
ui: add HGPLAIN environment variable for easier scripting...
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.

File last commit:

r10455:40dfd46d default
r10455:40dfd46d default
Show More
test-hgrc
46 lines | 1.1 KiB | text/plain | TextLexer
#!/bin/sh
echo "invalid" > $HGRCPATH
hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
echo "" > $HGRCPATH
# issue1199: escaping
hg init "foo%bar"
hg clone "foo%bar" foobar
p=`pwd`
cd foobar
cat .hg/hgrc | sed -e "s:$p:...:"
hg paths | sed -e "s:$p:...:"
hg showconfig | sed -e "s:$p:...:"
cd ..
# issue1829: wrong indentation
echo '[foo]' > $HGRCPATH
echo ' x = y' >> $HGRCPATH
hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \
> $HGRCPATH
hg showconfig foo
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:...:"