mercurial/hg.py
changeset 4081 e6d26e71f049
parent 3891 6b4127c7d52a
parent 4074 0f9381cf9723
child 4477 6cbfa740c129
--- a/mercurial/hg.py	Tue Jan 02 21:40:20 2007 -0800
+++ b/mercurial/hg.py	Tue Feb 13 10:25:45 2007 -0200
@@ -55,6 +55,7 @@
 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