##// END OF EJS Templates
Do not try to load extensions twice (issue811)
Benoit Boissinot -
r7011:7da76778 default
parent child Browse files
Show More
@@ -29,7 +29,7 b' def find(name):'
29 raise KeyError(name)
29 raise KeyError(name)
30
30
31 def load(ui, name, path):
31 def load(ui, name, path):
32 if name.startswith('hgext.'):
32 if name.startswith('hgext.') or name.startswith('hgext/'):
33 shortname = name[6:]
33 shortname = name[6:]
34 else:
34 else:
35 shortname = name
35 shortname = name
@@ -80,3 +80,25 b' echo "debugextension = $debugpath" >> $H'
80 hg help debugextension
80 hg help debugextension
81 hg --debug help debugextension
81 hg --debug help debugextension
82 echo 'debugextension = !' >> $HGRCPATH
82 echo 'debugextension = !' >> $HGRCPATH
83
84 echo % issue811
85 debugpath=`pwd`/debugissue811.py
86 cat > debugissue811.py <<EOF
87 '''show all loaded extensions
88 '''
89 from mercurial import extensions, commands
90
91 def debugextensions(ui):
92 "yet another debug command"
93 ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()]))
94
95 cmdtable = {"debugextensions": (debugextensions, (), "hg debugextensions")}
96 commands.norepo += " debugextensions"
97 EOF
98 echo "debugissue811 = $debugpath" >> $HGRCPATH
99 echo "mq=" >> $HGRCPATH
100 echo "hgext.mq=" >> $HGRCPATH
101 echo "hgext/mq=" >> $HGRCPATH
102
103 echo % show extensions
104 hg debugextensions
@@ -57,3 +57,7 b' global options:'
57 --profile print command execution profile
57 --profile print command execution profile
58 --version output version information and exit
58 --version output version information and exit
59 -h --help display help and exit
59 -h --help display help and exit
60 % issue811
61 % show extensions
62 debugissue811
63 mq
General Comments 0
You need to be logged in to leave comments. Login now