Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/hg.py (16 lines) | |||
M | tests/test-extension-timing.t (1 line) |
Status | Author | Revision | |
---|---|---|---|
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan |
if ui.configbool('devel', 'debug.extensions'): | if ui.configbool('devel', 'debug.extensions'): | ||||
log = lambda msg, *values: ui.debug('debug.extensions: ', | log = lambda msg, *values: ui.debug('debug.extensions: ', | ||||
msg % values, label='debug.extensions') | msg % values, label='debug.extensions') | ||||
else: | else: | ||||
log = lambda *a, **kw: None | log = lambda *a, **kw: None | ||||
for f in presetupfuncs or []: | for f in presetupfuncs or []: | ||||
f(ui, obj) | f(ui, obj) | ||||
log('- executing reposetup hooks\n') | log('- executing reposetup hooks\n') | ||||
with util.timedcm('all reposetup') as allreposetupstats: | |||||
for name, module in extensions.extensions(ui): | for name, module in extensions.extensions(ui): | ||||
log(' - running reposetup for %s\n' % (name,)) | log(' - running reposetup for %s\n' % (name,)) | ||||
hook = getattr(module, 'reposetup', None) | hook = getattr(module, 'reposetup', None) | ||||
if hook: | if hook: | ||||
with util.timedcm('reposetup %r', name) as stats: | with util.timedcm('reposetup %r', name) as stats: | ||||
hook(ui, obj) | hook(ui, obj) | ||||
log(' > reposetup for %r took %s\n', name, stats) | log(' > reposetup for %r took %s\n', name, stats) | ||||
log('> all reposetup took %s\n', allreposetupstats) | |||||
if not obj.local(): | if not obj.local(): | ||||
for f in wirepeersetupfuncs: | for f in wirepeersetupfuncs: | ||||
f(ui, obj) | f(ui, obj) | ||||
return obj | return obj | ||||
def repository(ui, path='', create=False, presetupfuncs=None, intents=None): | def repository(ui, path='', create=False, presetupfuncs=None, intents=None): | ||||
"""return a repository object for the specified path""" | """return a repository object for the specified path""" | ||||
peer = _peerorrepo(ui, path, create, presetupfuncs=presetupfuncs, | peer = _peerorrepo(ui, path, create, presetupfuncs=presetupfuncs, |
debug.extensions: - loading extension registration objects | debug.extensions: - loading extension registration objects | ||||
debug.extensions: > extension registration object loading took * (glob) | debug.extensions: > extension registration object loading took * (glob) | ||||
debug.extensions: extension loading complete | debug.extensions: extension loading complete | ||||
debug.extensions: - executing reposetup hooks | debug.extensions: - executing reposetup hooks | ||||
debug.extensions: - running reposetup for foobar | debug.extensions: - running reposetup for foobar | ||||
reposetup called for a | reposetup called for a | ||||
ui == repo.ui | ui == repo.ui | ||||
debug.extensions: > reposetup for 'foobar' took * (glob) | debug.extensions: > reposetup for 'foobar' took * (glob) | ||||
debug.extensions: > all reposetup took * (glob) | |||||
Foo | Foo | ||||
$ cd .. | $ cd .. | ||||
$ echo 'foobar = !' >> $HGRCPATH | $ echo 'foobar = !' >> $HGRCPATH |