diff mercurial/hg.py @ 4081:e6d26e71f049

merge with crew-stable
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 13 Feb 2007 10:25:45 -0200
parents 6b4127c7d52a 0f9381cf9723
children 6cbfa740c129
line wrap: on
line diff
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -55,6 +55,7 @@ repo_setup_hooks = []
 def repository(ui, path='', create=False):
     """return a repository object for the specified path"""
     repo = _lookup(path).instance(ui, path, create)
+    ui = getattr(repo, "ui", ui)
     for hook in repo_setup_hooks:
         hook(ui, repo)
     return repo