#!/bin/sh # Test basic extension support "$TESTDIR/hghave" no-outer-repo || exit 80 cat > foobar.py < file hg add file hg commit -m 'add file' echo '[extensions]' >> $HGRCPATH echo "foobar = $abspath" >> $HGRCPATH hg foo cd .. hg clone a b hg bar echo 'foobar = !' >> $HGRCPATH echo '% module/__init__.py-style' echo "barfoo = $barfoopath" >> $HGRCPATH cd a hg foo echo 'barfoo = !' >> $HGRCPATH # check that extensions are loaded in phases cat > foo.py <> $HGRCPATH echo 'bar = bar.py' >> $HGRCPATH # command with no output, we just want to see the extensions loaded hg paths # check hgweb's load order echo '% hgweb.cgi' cat > hgweb.cgi <> $HGRCPATH echo 'bar = !' >> $HGRCPATH cd .. cat > empty.py <> $HGRCPATH hg help empty echo 'empty = !' >> $HGRCPATH cat > debugextension.py <> $HGRCPATH echo "% hg help" hg help debugextension echo "% hg help --verbose" hg --verbose help debugextension echo "% hg help --debug" hg --debug help debugextension echo 'debugextension = !' >> $HGRCPATH echo % issue811 debugpath=`pwd`/debugissue811.py cat > debugissue811.py <> $HGRCPATH echo "mq=" >> $HGRCPATH echo "hgext.mq=" >> $HGRCPATH echo "hgext/mq=" >> $HGRCPATH echo % show extensions hg debugextensions echo '% disabled extension commands' HGRCPATH= hg help email hg qdel hg churn echo '% disabled extensions' hg help churn hg help patchbomb echo '% broken disabled extension and command' mkdir hgext echo > hgext/__init__.py cat > hgext/broken.py < path.py < /dev/null exit 0