##// END OF EJS Templates
extensions: changed to call extsetup() from extensions.loadall()...
Yuya Nishihara -
r9660:e0eae93e default
parent child Browse files
Show More
@@ -358,17 +358,7 b' def _dispatch(ui, args):'
358 extensions.loadall(lui)
358 extensions.loadall(lui)
359 exts = [ext for ext in extensions.extensions() if ext[0] not in _loaded]
359 exts = [ext for ext in extensions.extensions() if ext[0] not in _loaded]
360
360
361 # (uisetup is handled in extensions.loadall)
361 # (uisetup and extsetup are handled in extensions.loadall)
362
363 for name, module in exts:
364 extsetup = getattr(module, 'extsetup', None)
365 if extsetup:
366 try:
367 extsetup(ui)
368 except TypeError:
369 if extsetup.func_code.co_argcount != 0:
370 raise
371 extsetup() # old extsetup with no ui argument
372
362
373 for name, module in exts:
363 for name, module in exts:
374 cmdtable = getattr(module, 'cmdtable', {})
364 cmdtable = getattr(module, 'cmdtable', {})
@@ -93,6 +93,16 b' def loadall(ui):'
93 if uisetup:
93 if uisetup:
94 uisetup(ui)
94 uisetup(ui)
95
95
96 for name in _order[newindex:]:
97 extsetup = getattr(_extensions[name], 'extsetup', None)
98 if extsetup:
99 try:
100 extsetup(ui)
101 except TypeError:
102 if extsetup.func_code.co_argcount != 0:
103 raise
104 extsetup() # old extsetup with no ui argument
105
96 def wrapcommand(table, command, wrapper):
106 def wrapcommand(table, command, wrapper):
97 aliases, entry = cmdutil.findcmd(command, table)
107 aliases, entry = cmdutil.findcmd(command, table)
98 for alias, e in table.iteritems():
108 for alias, e in table.iteritems():
General Comments 0
You need to be logged in to leave comments. Login now