Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/hg.py @ 2835: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 | 49988d9f0758 |
children | 345bac2bc4ec |
line wrap: on
line diff
--- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -48,9 +48,14 @@ def islocal(repo): return False return repo.local() +repo_setup_hooks = [] + def repository(ui, path=None, create=False): """return a repository object for the specified path""" - return _lookup(path).instance(ui, path, create) + repo = _lookup(path).instance(ui, path, create) + for hook in repo_setup_hooks: + hook(ui, repo) + return repo def defaultdest(source): '''return default destination of clone if none is given'''