Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgweb_mod.py @ 8136:6b5522cb2ad2
ui: refactor option setting
No more passing options as constructor keywords. Basic options are now
always stored in the overlay for simplicity and consistency.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 23 Apr 2009 15:40:10 -0500 |
parents | aa983c3d94a9 |
children | 35604226d712 |
comparison
equal
deleted
inserted
replaced
8135:16771d7c64e2 | 8136:6b5522cb2ad2 |
---|---|
23 } | 23 } |
24 | 24 |
25 class hgweb(object): | 25 class hgweb(object): |
26 def __init__(self, repo, name=None): | 26 def __init__(self, repo, name=None): |
27 if isinstance(repo, str): | 27 if isinstance(repo, str): |
28 parentui = ui.ui(report_untrusted=False, interactive=False) | 28 parentui = ui.ui() |
29 parentui.setconfig('ui', 'report_untrusted', 'off') | |
30 parentui.setconfig('ui', 'interactive', 'off') | |
29 self.repo = hg.repository(parentui, repo) | 31 self.repo = hg.repository(parentui, repo) |
30 else: | 32 else: |
31 self.repo = repo | 33 self.repo = repo |
32 | 34 |
33 hook.redirect(True) | 35 hook.redirect(True) |