mercurial/hg.py
changeset 4074 0f9381cf9723
parent 3869 ad6f34c83c3d
child 4081 e6d26e71f049
equal deleted inserted replaced
4067:c620376b8fd6 4074:0f9381cf9723
    52 repo_setup_hooks = []
    52 repo_setup_hooks = []
    53 
    53 
    54 def repository(ui, path='', create=False):
    54 def repository(ui, path='', create=False):
    55     """return a repository object for the specified path"""
    55     """return a repository object for the specified path"""
    56     repo = _lookup(path).instance(ui, path, create)
    56     repo = _lookup(path).instance(ui, path, create)
       
    57     ui = getattr(repo, "ui", ui)
    57     for hook in repo_setup_hooks:
    58     for hook in repo_setup_hooks:
    58         hook(ui, repo)
    59         hook(ui, repo)
    59     return repo
    60     return repo
    60 
    61 
    61 def defaultdest(source):
    62 def defaultdest(source):