6 # This software may be used and distributed according to the terms of the |
6 # This software may be used and distributed according to the terms of the |
7 # GNU General Public License version 2 or any later version. |
7 # GNU General Public License version 2 or any later version. |
8 |
8 |
9 import os, re, time |
9 import os, re, time |
10 from mercurial.i18n import _ |
10 from mercurial.i18n import _ |
11 from mercurial import ui, hg, scmutil, util, templater |
11 from mercurial import hg, scmutil, util, templater |
|
12 from mercurial import ui as uimod |
12 from mercurial import error, encoding |
13 from mercurial import error, encoding |
13 from common import ErrorResponse, get_mtime, staticfile, paritygen, ismember, \ |
14 from common import ErrorResponse, get_mtime, staticfile, paritygen, ismember, \ |
14 get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR |
15 get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR |
15 from hgweb_mod import hgweb, makebreadcrumb |
16 from hgweb_mod import hgweb, makebreadcrumb |
16 from request import wsgirequest |
17 from request import wsgirequest |
106 return |
107 return |
107 |
108 |
108 if self.baseui: |
109 if self.baseui: |
109 u = self.baseui.copy() |
110 u = self.baseui.copy() |
110 else: |
111 else: |
111 u = ui.ui() |
112 u = uimod.ui() |
112 u.setconfig('ui', 'report_untrusted', 'off', 'hgwebdir') |
113 u.setconfig('ui', 'report_untrusted', 'off', 'hgwebdir') |
113 u.setconfig('ui', 'nontty', 'true', 'hgwebdir') |
114 u.setconfig('ui', 'nontty', 'true', 'hgwebdir') |
114 # displaying bundling progress bar while serving feels wrong and may |
115 # displaying bundling progress bar while serving feels wrong and may |
115 # break some wsgi implementations. |
116 # break some wsgi implementations. |
116 u.setconfig('progress', 'disable', 'true', 'hgweb') |
117 u.setconfig('progress', 'disable', 'true', 'hgweb') |