tests/test-extension
changeset 5523 5db730475d6d
parent 4950 93b7e2fa7ee3
child 7011 7da76778dbd7
equal deleted inserted replaced
5522:f5345a2d2391 5523:5db730475d6d
    45 
    45 
    46 cd ..
    46 cd ..
    47 hg clone a b
    47 hg clone a b
    48 
    48 
    49 hg bar
    49 hg bar
       
    50 echo 'foobar = !' >> $HGRCPATH
    50 
    51 
    51 echo '% module/__init__.py-style'
    52 echo '% module/__init__.py-style'
    52 echo '[extensions]' > $HGRCPATH
       
    53 echo "barfoo = $barfoopath" >> $HGRCPATH
    53 echo "barfoo = $barfoopath" >> $HGRCPATH
    54 cd a
    54 cd a
    55 hg foo
    55 hg foo
       
    56 echo 'barfoo = !' >> $HGRCPATH
    56 
    57 
    57 cd ..
    58 cd ..
    58 cat > empty.py <<EOF
    59 cat > empty.py <<EOF
    59 '''empty cmdtable
    60 '''empty cmdtable
    60 '''
    61 '''
    61 cmdtable = {}
    62 cmdtable = {}
    62 EOF
    63 EOF
    63 emptypath=`pwd`/empty.py
    64 emptypath=`pwd`/empty.py
    64 echo '[extensions]' > $HGRCPATH
       
    65 echo "empty = $emptypath" >> $HGRCPATH
    65 echo "empty = $emptypath" >> $HGRCPATH
    66 hg help empty
    66 hg help empty
       
    67 echo 'empty = !' >> $HGRCPATH
    67 
    68 
    68 cat > debugextension.py <<EOF
    69 cat > debugextension.py <<EOF
    69 '''only debugcommands
    70 '''only debugcommands
    70 '''
    71 '''
    71 def debugfoobar(ui, repo, *args, **opts):
    72 def debugfoobar(ui, repo, *args, **opts):
    73     pass
    74     pass
    74 
    75 
    75 cmdtable = {"debugfoobar": (debugfoobar, (), "hg debugfoobar")}
    76 cmdtable = {"debugfoobar": (debugfoobar, (), "hg debugfoobar")}
    76 EOF
    77 EOF
    77 debugpath=`pwd`/debugextension.py
    78 debugpath=`pwd`/debugextension.py
    78 echo '[extensions]' > $HGRCPATH
       
    79 echo "debugextension = $debugpath" >> $HGRCPATH
    79 echo "debugextension = $debugpath" >> $HGRCPATH
    80 hg help debugextension
    80 hg help debugextension
    81 hg --debug help debugextension
    81 hg --debug help debugextension
       
    82 echo 'debugextension = !' >> $HGRCPATH