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