Mercurial > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 27007:c8cbef073645
hgweb: alias ui module as uimod
It will be enforced by the import checker.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Nov 2015 13:58:32 +0900 |
parents | 56b2bcea2529 |
children | ccdc95c6841e |
comparison
equal
deleted
inserted
replaced
27006:9d58dc193c46 | 27007:c8cbef073645 |
---|---|
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') |