diff --git a/hgext/zeroconf/__init__.py b/hgext/zeroconf/__init__.py --- a/hgext/zeroconf/__init__.py +++ b/hgext/zeroconf/__init__.py @@ -112,7 +112,7 @@ class hgwebzc(hgweb_mod.hgweb): class hgwebdirzc(hgwebdir_mod.hgwebdir): def run(self): for r, p in self.repos: - u = self.parentui.copy() + u = self.ui.copy() u.readconfig(os.path.join(p, '.hg', 'hgrc')) n = os.path.basename(r) publish(n, "hgweb", p, int(u.config("web", "port", 8000))) diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -25,10 +25,10 @@ perms = { class hgweb(object): def __init__(self, repo, name=None): if isinstance(repo, str): - parentui = ui.ui() - parentui.setconfig('ui', 'report_untrusted', 'off') - parentui.setconfig('ui', 'interactive', 'off') - self.repo = hg.repository(parentui, repo) + u = ui.ui() + u.setconfig('ui', 'report_untrusted', 'off') + u.setconfig('ui', 'interactive', 'off') + self.repo = hg.repository(u, repo) else: self.repo = repo diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -17,17 +17,17 @@ from request import wsgirequest # This is a stopgap class hgwebdir(object): - def __init__(self, conf, parentui=None): + def __init__(self, conf, baseui=None): def cleannames(items): return [(util.pconvert(name).strip('/'), path) for name, path in items] - if parentui: - self.parentui = parentui + if baseui: + self.ui = baseui.copy() else: - self.parentui = ui.ui() - self.parentui.setconfig('ui', 'report_untrusted', 'off') - self.parentui.setconfig('ui', 'interactive', 'off') + self.ui = ui.ui() + self.ui.setconfig('ui', 'report_untrusted', 'off') + self.ui.setconfig('ui', 'interactive', 'off') self.motd = None self.style = 'paper' @@ -144,7 +144,7 @@ class hgwebdir(object): if real: req.env['REPO_NAME'] = virtual try: - repo = hg.repository(self.parentui, real) + repo = hg.repository(self.ui, real) return hgweb(repo).run_wsgi(req) except IOError, inst: msg = inst.strerror @@ -203,7 +203,7 @@ class hgwebdir(object): continue name = name[len(subdir):] - u = self.parentui.copy() + u = self.ui.copy() try: u.readconfig(os.path.join(path, '.hg', 'hgrc')) except Exception, e: @@ -297,7 +297,7 @@ class hgwebdir(object): yield config('web', 'motd', '') def config(section, name, default=None, untrusted=True): - return self.parentui.config(section, name, default, untrusted) + return self.ui.config(section, name, default, untrusted) if self._baseurl is not None: req.env['SCRIPT_NAME'] = self._baseurl