mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
Do not try to load extensions twice (issue811)
This commit is contained in:
parent
83c55610b6
commit
7ba2d57a89
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user