##// END OF EJS Templates
hgweb: alias ui module as uimod...
Yuya Nishihara -
r27007:c8cbef07 default
parent child Browse files
Show More
@@ -8,7 +8,8 b''
8
8
9 import contextlib
9 import contextlib
10 import os
10 import os
11 from mercurial import ui, hg, hook, error, encoding, templater, util, repoview
11 from mercurial import hg, hook, error, encoding, templater, util, repoview
12 from mercurial import ui as uimod
12 from mercurial.templatefilters import websub
13 from mercurial.templatefilters import websub
13 from common import ErrorResponse, permhooks, caching
14 from common import ErrorResponse, permhooks, caching
14 from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST
15 from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST
@@ -195,7 +196,7 b' class hgweb(object):'
195 if baseui:
196 if baseui:
196 u = baseui.copy()
197 u = baseui.copy()
197 else:
198 else:
198 u = ui.ui()
199 u = uimod.ui()
199 r = hg.repository(u, repo)
200 r = hg.repository(u, repo)
200 else:
201 else:
201 # we trust caller to give us a private copy
202 # we trust caller to give us a private copy
@@ -8,7 +8,8 b''
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
@@ -108,7 +109,7 b' class hgwebdir(object):'
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
@@ -8,7 +8,8 b''
8
8
9 import os, copy
9 import os, copy
10 import re
10 import re
11 from mercurial import match, patch, error, ui, util, pathutil, context
11 from mercurial import match, patch, error, util, pathutil, context
12 from mercurial import ui as uimod
12 from mercurial.i18n import _
13 from mercurial.i18n import _
13 from mercurial.node import hex, nullid, short
14 from mercurial.node import hex, nullid, short
14 from mercurial.templatefilters import revescape
15 from mercurial.templatefilters import revescape
@@ -537,7 +538,7 b' class sessionvars(object):'
537 yield {'name': key, 'value': str(value), 'separator': separator}
538 yield {'name': key, 'value': str(value), 'separator': separator}
538 separator = '&'
539 separator = '&'
539
540
540 class wsgiui(ui.ui):
541 class wsgiui(uimod.ui):
541 # default termwidth breaks under mod_wsgi
542 # default termwidth breaks under mod_wsgi
542 def termwidth(self):
543 def termwidth(self):
543 return 80
544 return 80
General Comments 0
You need to be logged in to leave comments. Login now