Show More
@@ -3545,6 +3545,7 b' def dispatch(args):' | |||
|
3545 | 3545 | mod = sys.modules[name] |
|
3546 | 3546 | if hasattr(mod, 'reposetup'): |
|
3547 | 3547 | mod.reposetup(u, repo) |
|
3548 | hg.repo_setup_hooks.append(mod.reposetup) | |
|
3548 | 3549 | except hg.RepoError: |
|
3549 | 3550 | if cmd not in optionalrepo.split(): |
|
3550 | 3551 | raise |
@@ -48,9 +48,14 b' def islocal(repo):' | |||
|
48 | 48 | return False |
|
49 | 49 | return repo.local() |
|
50 | 50 | |
|
51 | repo_setup_hooks = [] | |
|
52 | ||
|
51 | 53 | def repository(ui, path=None, create=False): |
|
52 | 54 | """return a repository object for the specified path""" |
|
53 |
re |
|
|
55 | repo = _lookup(path).instance(ui, path, create) | |
|
56 | for hook in repo_setup_hooks: | |
|
57 | hook(ui, repo) | |
|
58 | return repo | |
|
54 | 59 | |
|
55 | 60 | def defaultdest(source): |
|
56 | 61 | '''return default destination of clone if none is given''' |
General Comments 0
You need to be logged in to leave comments.
Login now