# HG changeset patch # User Dirkjan Ochtman # Date 1189179532 -7200 # Node ID ed6df6b1c29af317bf130c65bb51c09989a809d0 # Parent aea35488ea66d08bd6a33abc0c0336266ab82b28 Prevent WSGI apps from touching sys.stdin by setting ui.interactive to False. 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 @@ -65,7 +65,8 @@ def revnavgen(pos, pagelen, limit, nodef class hgweb(object): def __init__(self, repo, name=None): if type(repo) == type(""): - self.repo = hg.repository(ui.ui(report_untrusted=False), repo) + parentui = ui.ui(report_untrusted=False, interactive=False) + self.repo = hg.repository(parentui, 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 @@ -83,7 +83,8 @@ class hgwebdir(object): else: yield config('web', 'motd', '') - parentui = self.parentui or ui.ui(report_untrusted=False) + parentui = self.parentui or ui.ui(report_untrusted=False, + interactive=False) def config(section, name, default=None, untrusted=True): return parentui.config(section, name, default, untrusted)