Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/hg.py @ 2899:bee4b7abcb01
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 14 Aug 2006 14:42:15 -0500 |
parents | 345bac2bc4ec |
children | 3acb76f0124d |
line wrap: on
line diff
--- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -1,6 +1,7 @@ # hg.py - repository classes for mercurial # -# Copyright 2005 Matt Mackall <mpm@selenic.com> +# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> +# Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. @@ -48,9 +49,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'''