Do not try to load extensions twice (issue811)

This commit is contained in:
Benoit Boissinot 2008-09-09 14:43:12 +02:00
parent 83c55610b6
commit 7ba2d57a89
3 changed files with 27 additions and 1 deletions

View File

@ -29,7 +29,7 @@ def find(name):
raise KeyError(name)
def load(ui, name, path):
if name.startswith('hgext.'):
if name.startswith('hgext.') or name.startswith('hgext/'):
shortname = name[6:]
else:
shortname = name

View File

@ -80,3 +80,25 @@ echo "debugextension = $debugpath" >> $HGRCPATH
hg help debugextension
hg --debug help debugextension
echo 'debugextension = !' >> $HGRCPATH
echo % issue811
debugpath=`pwd`/debugissue811.py
cat > debugissue811.py <<EOF
'''show all loaded extensions
'''
from mercurial import extensions, commands
def debugextensions(ui):
"yet another debug command"
ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()]))
cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")}
commands.norepo += " debugextensions"
EOF
echo "debugissue811 = $debugpath" >> $HGRCPATH
echo "mq=" >> $HGRCPATH
echo "hgext.mq=" >> $HGRCPATH
echo "hgext/mq=" >> $HGRCPATH
echo % show extensions
hg debugextensions

View File

@ -57,3 +57,7 @@ global options:
--profile print command execution profile
--version output version information and exit
-h --help display help and exit
% issue811
% show extensions
debugissue811
mq