Mercurial > hg
view tests/test-hgrc @ 10669:181cbb23572e stable
test-extension: fix disabled extension tests for run-tests.py --local
One test that requires inserting a broken extension into hgext does this
by modifying PYTHONPATH. This doesn't work when run with --local because
the 'hg' script being used is in the same directory as the local hgext.
Instead of modifying PYTHONPATH, a secondary extension is enabled using
--config that inserts the dummy hgext at the beginning of sys.path,
before the script's path.
author | Brodie Rao <me+hg@dackz.net> |
---|---|
date | Fri, 05 Mar 2010 17:38:02 -0500 |
parents | 992723445a29 |
children | f23f87462c18 |
line wrap: on
line source
#!/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 "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 echo "log=log -g" >> $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:...:"