Mercurial > hg
comparison mercurial/commands.py @ 2847:2ff57e3113a4
call reposetup functions of extension modules whenever repo created
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Thu, 10 Aug 2006 15:44:05 -0700 |
parents | 3aeab7bb5adc |
children | 7706fa503677 cdbca3d59518 |
comparison
equal
deleted
inserted
replaced
2846:b8d587cfa3bb | 2847:2ff57e3113a4 |
---|---|
3543 u = repo.ui | 3543 u = repo.ui |
3544 for name in external.itervalues(): | 3544 for name in external.itervalues(): |
3545 mod = sys.modules[name] | 3545 mod = sys.modules[name] |
3546 if hasattr(mod, 'reposetup'): | 3546 if hasattr(mod, 'reposetup'): |
3547 mod.reposetup(u, repo) | 3547 mod.reposetup(u, repo) |
3548 hg.repo_setup_hooks.append(mod.reposetup) | |
3548 except hg.RepoError: | 3549 except hg.RepoError: |
3549 if cmd not in optionalrepo.split(): | 3550 if cmd not in optionalrepo.split(): |
3550 raise | 3551 raise |
3551 d = lambda: func(u, repo, *args, **cmdoptions) | 3552 d = lambda: func(u, repo, *args, **cmdoptions) |
3552 else: | 3553 else: |