# HG changeset patch # User Augie Fackler # Date 1286723237 18000 # Node ID 94e7bd38d9a31226ec1bef394f16da0e8d86f8aa # Parent c52c629ce19ea8206245885ee74ccd4153569e11 hgwebdir_mod: use fake termwidth to avoid mod_wsgi's wrath diff -r c52c629ce19e -r 94e7bd38d9a3 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Sun Oct 10 10:06:36 2010 -0500 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun Oct 10 10:07:17 2010 -0500 @@ -41,6 +41,11 @@ repos.append((name, path)) return repos +class wsgiui(ui.ui): + # default termwidth breaks under mod_wsgi + def termwidth(self): + return 80 + class hgwebdir(object): refreshinterval = 20 @@ -58,7 +63,7 @@ if self.baseui: u = self.baseui.copy() else: - u = ui.ui() + u = wsgiui() u.setconfig('ui', 'report_untrusted', 'off') u.setconfig('ui', 'interactive', 'off')