160 def _peerorrepo(ui, path, create=False, presetupfuncs=None, |
161 def _peerorrepo(ui, path, create=False, presetupfuncs=None, |
161 intents=None): |
162 intents=None): |
162 """return a repository object for the specified path""" |
163 """return a repository object for the specified path""" |
163 obj = _peerlookup(path).instance(ui, path, create, intents=intents) |
164 obj = _peerlookup(path).instance(ui, path, create, intents=intents) |
164 ui = getattr(obj, "ui", ui) |
165 ui = getattr(obj, "ui", ui) |
|
166 if ui.configbool('devel', 'debug.extensions'): |
|
167 log = functools.partial( |
|
168 ui.debug, 'debug.extensions: ', label='debug.extensions') |
|
169 else: |
|
170 log = lambda *a, **kw: None |
165 for f in presetupfuncs or []: |
171 for f in presetupfuncs or []: |
166 f(ui, obj) |
172 f(ui, obj) |
|
173 log('- executing reposetup hooks\n') |
167 for name, module in extensions.extensions(ui): |
174 for name, module in extensions.extensions(ui): |
|
175 log(' - running reposetup for %s\n' % (name,)) |
168 hook = getattr(module, 'reposetup', None) |
176 hook = getattr(module, 'reposetup', None) |
169 if hook: |
177 if hook: |
170 hook(ui, obj) |
178 hook(ui, obj) |
171 if not obj.local(): |
179 if not obj.local(): |
172 for f in wirepeersetupfuncs: |
180 for f in wirepeersetupfuncs: |