comparison mercurial/hgweb/hgweb_mod.py @ 10994:c12a57c1a67e

hgweb: add baseui to hgweb entrypoint
author Matt Mackall <mpm@selenic.com>
date Mon, 26 Apr 2010 11:03:40 -0500
parents 13a1b2fb7ef2
children 5efbfa662b3c
comparison
equal deleted inserted replaced
10993:c1b43d786889 10994:c12a57c1a67e
19 'unbundle': 'push', 19 'unbundle': 'push',
20 'stream_out': 'pull', 20 'stream_out': 'pull',
21 } 21 }
22 22
23 class hgweb(object): 23 class hgweb(object):
24 def __init__(self, repo, name=None): 24 def __init__(self, repo, name=None, baseui=None):
25 if isinstance(repo, str): 25 if isinstance(repo, str):
26 u = ui.ui() 26 if baseui:
27 u = baseui.copy()
28 else:
29 u = ui.ui()
27 u.setconfig('ui', 'report_untrusted', 'off') 30 u.setconfig('ui', 'report_untrusted', 'off')
28 u.setconfig('ui', 'interactive', 'off') 31 u.setconfig('ui', 'interactive', 'off')
29 self.repo = hg.repository(u, repo) 32 self.repo = hg.repository(u, repo)
30 else: 33 else:
31 self.repo = repo 34 self.repo = repo