test-hgrc
76 lines
| 1.7 KiB
| text/plain
|
TextLexer
/ tests / test-hgrc
Benoit Boissinot
|
r1473 | #!/bin/sh | ||
Martin Geisler
|
r10043 | echo "invalid" > $HGRCPATH | ||
hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" | ||||
echo "" > $HGRCPATH | ||||
Benoit Boissinot
|
r7044 | |||
Martin Geisler
|
r10043 | # issue1199: escaping | ||
Benoit Boissinot
|
r7044 | hg init "foo%bar" | ||
hg clone "foo%bar" foobar | ||||
p=`pwd` | ||||
cd foobar | ||||
Martin Geisler
|
r10043 | cat .hg/hgrc | sed -e "s:$p:...:" | ||
hg paths | sed -e "s:$p:...:" | ||||
hg showconfig | sed -e "s:$p:...:" | ||||
cd .. | ||||
Martin Geisler
|
r9470 | |||
# issue1829: wrong indentation | ||||
Martin Geisler
|
r10043 | echo '[foo]' > $HGRCPATH | ||
Martin Geisler
|
r9470 | echo ' x = y' >> $HGRCPATH | ||
hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" | ||||
Martin Geisler
|
r10042 | |||
Matt Mackall
|
r10295 | python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ | ||
> $HGRCPATH | ||||
hg showconfig foo | ||||
Chad Dombrova
|
r11224 | FAKEPATH=/path/to/nowhere | ||
export FAKEPATH | ||||
echo '%include $FAKEPATH/no-such-file' > $HGRCPATH | ||||
Martin Geisler
|
r10042 | hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" | ||
Chad Dombrova
|
r11224 | unset FAKEPATH | ||
Brodie Rao
|
r10455 | |||
Chad Dombrova
|
r11225 | echo "% username expansion" | ||
olduser=$HGUSER | ||||
unset HGUSER | ||||
FAKEUSER='John Doe' | ||||
export FAKEUSER | ||||
echo '[ui]' > $HGRCPATH | ||||
echo 'username = $FAKEUSER' >> $HGRCPATH | ||||
hg init usertest | ||||
cd usertest | ||||
touch bar | ||||
hg commit --addremove --quiet -m "added bar" | ||||
hg log --template "{author}\n" | ||||
cd .. | ||||
hg showconfig | sed -e "s:$p:...:" | ||||
unset FAKEUSER | ||||
HGUSER=$olduser | ||||
export HGUSER | ||||
Brodie Rao
|
r10455 | # HGPLAIN | ||
cd .. | ||||
p=`pwd` | ||||
echo "[ui]" > $HGRCPATH | ||||
echo "debug=true" >> $HGRCPATH | ||||
echo "fallbackencoding=ASCII" >> $HGRCPATH | ||||
echo "quiet=true" >> $HGRCPATH | ||||
Brodie Rao
|
r10507 | echo "slash=true" >> $HGRCPATH | ||
Brodie Rao
|
r10455 | echo "traceback=true" >> $HGRCPATH | ||
echo "verbose=true" >> $HGRCPATH | ||||
Yuya Nishihara
|
r10567 | echo "style=~/.hgstyle" >> $HGRCPATH | ||
echo "logtemplate={node}" >> $HGRCPATH | ||||
Brodie Rao
|
r10455 | echo "[defaults]" >> $HGRCPATH | ||
echo "identify=-n" >> $HGRCPATH | ||||
Brodie Rao
|
r10506 | echo "[alias]" >> $HGRCPATH | ||
echo "log=log -g" >> $HGRCPATH | ||||
Brodie Rao
|
r10455 | |||
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:...:" | ||||