Mercurial > public > mercurial-scm > hg
comparison mercurial/extensions.py @ 9660:e0eae93e6c67
extensions: changed to call extsetup() from extensions.loadall()
previously uisetup() was invoked by extensions.loadall(), but
extsetup() was by _dispatch().
there's no need to split them because we have nothing to do
between uisetup() and extsetup().
this fixes issue1824 indirectly.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 28 Oct 2009 23:55:23 +0900 |
parents | d78fe60f6bda |
children | a1943c2a4661 |
comparison
equal
deleted
inserted
replaced
9659:f53c549237ca | 9660:e0eae93e6c67 |
---|---|
91 for name in _order[newindex:]: | 91 for name in _order[newindex:]: |
92 uisetup = getattr(_extensions[name], 'uisetup', None) | 92 uisetup = getattr(_extensions[name], 'uisetup', None) |
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(): |
99 if e is entry: | 109 if e is entry: |
100 key = alias | 110 key = alias |