comparison mercurial/hgweb/hgweb_mod.py @ 37849:5b831053d9b6 stable

hgweb: do not try to replace signal handlers while locking According to the issue 5889, mod_wsgi issues a warning on signal.signal() call, and we wouldn't want to see it in error log. The problem addressed by d77c3b023393 could potentially occur in web session, but that would be less likely than in user processes.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 18 May 2018 21:32:05 +0900
parents 11ee9bf24791
children 519b46a8f4d2
comparison
equal deleted inserted replaced
37848:8c828beb7543 37849:5b831053d9b6
223 r.ui.setconfig('ui', 'nontty', 'true', 'hgweb') 223 r.ui.setconfig('ui', 'nontty', 'true', 'hgweb')
224 r.baseui.setconfig('ui', 'nontty', 'true', 'hgweb') 224 r.baseui.setconfig('ui', 'nontty', 'true', 'hgweb')
225 # resolve file patterns relative to repo root 225 # resolve file patterns relative to repo root
226 r.ui.setconfig('ui', 'forcecwd', r.root, 'hgweb') 226 r.ui.setconfig('ui', 'forcecwd', r.root, 'hgweb')
227 r.baseui.setconfig('ui', 'forcecwd', r.root, 'hgweb') 227 r.baseui.setconfig('ui', 'forcecwd', r.root, 'hgweb')
228 # it's unlikely that we can replace signal handlers in WSGI server,
229 # and mod_wsgi issues a big warning. a plain hgweb process (with no
230 # threading) could replace signal handlers, but we don't bother
231 # conditionally enabling it.
232 r.ui.setconfig('ui', 'signal-safe-lock', 'false', 'hgweb')
233 r.baseui.setconfig('ui', 'signal-safe-lock', 'false', 'hgweb')
228 # displaying bundling progress bar while serving feel wrong and may 234 # displaying bundling progress bar while serving feel wrong and may
229 # break some wsgi implementation. 235 # break some wsgi implementation.
230 r.ui.setconfig('progress', 'disable', 'true', 'hgweb') 236 r.ui.setconfig('progress', 'disable', 'true', 'hgweb')
231 r.baseui.setconfig('progress', 'disable', 'true', 'hgweb') 237 r.baseui.setconfig('progress', 'disable', 'true', 'hgweb')
232 self._repos = [hg.cachedlocalrepo(self._webifyrepo(r))] 238 self._repos = [hg.cachedlocalrepo(self._webifyrepo(r))]