# HG changeset patch # User Matt Mackall # Date 1272297820 18000 # Node ID c12a57c1a67e338a6e48a54d1c09348b904e5c94 # Parent c1b43d786889b5a36735e18c766f93db14ab8bf1 hgweb: add baseui to hgweb entrypoint diff -r c1b43d786889 -r c12a57c1a67e mercurial/hgweb/__init__.py --- a/mercurial/hgweb/__init__.py Mon Apr 26 11:03:40 2010 -0500 +++ b/mercurial/hgweb/__init__.py Mon Apr 26 11:03:40 2010 -0500 @@ -8,8 +8,8 @@ import hgweb_mod, hgwebdir_mod -def hgweb(repo, name=None): - return hgweb_mod.hgweb(repo, name=name) +def hgweb(repo, name=None, baseui=None): + return hgweb_mod.hgweb(repo, name=name, baseui=baseui) def hgwebdir(config, baseui=None): return hgwebdir_mod.hgwebdir(config, baseui=baseui) diff -r c1b43d786889 -r c12a57c1a67e mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Mon Apr 26 11:03:40 2010 -0500 +++ b/mercurial/hgweb/hgweb_mod.py Mon Apr 26 11:03:40 2010 -0500 @@ -21,9 +21,12 @@ } class hgweb(object): - def __init__(self, repo, name=None): + def __init__(self, repo, name=None, baseui=None): if isinstance(repo, str): - u = ui.ui() + if baseui: + u = baseui.copy() + else: + u = ui.ui() u.setconfig('ui', 'report_untrusted', 'off') u.setconfig('ui', 'interactive', 'off') self.repo = hg.repository(u, repo)