##// END OF EJS Templates
Handle extensions with defined but empty cmdtable
Brendan Cully -
r4738:c41a404a default
parent child Browse files
Show More
@@ -1395,6 +1395,8 b' def help_(ui, name=None, with_version=Fa'
1395 try:
1395 try:
1396 ct = mod.cmdtable
1396 ct = mod.cmdtable
1397 except AttributeError:
1397 except AttributeError:
1398 ct = None
1399 if not ct:
1398 ui.status(_('no commands defined\n'))
1400 ui.status(_('no commands defined\n'))
1399 return
1401 return
1400
1402
@@ -53,3 +53,14 b" 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
57 cd ..
58 cat > empty.py <<EOF
59 '''empty cmdtable
60 '''
61 cmdtable = {}
62 EOF
63 emptypath=`pwd`/empty.py
64 echo '[extensions]' > $HGRCPATH
65 echo "empty = $emptypath" >> $HGRCPATH
66 hg help empty
@@ -19,3 +19,6 b' ui.parentui isnot None'
19 reposetup called for a
19 reposetup called for a
20 ui == repo.ui
20 ui == repo.ui
21 Foo
21 Foo
22 empty extension - empty cmdtable
23
24 no commands defined
General Comments 0
You need to be logged in to leave comments. Login now