##// END OF EJS Templates
hgweb: fix hgweb_mod as well as hgwebdir_mod
Augie Fackler -
r12691:1b1a9038 default
parent child Browse files
Show More
@@ -28,7 +28,7 b' class hgweb(object):'
28 if baseui:
28 if baseui:
29 u = baseui.copy()
29 u = baseui.copy()
30 else:
30 else:
31 u = ui.ui()
31 u = webutil.wsgiui()
32 self.repo = hg.repository(u, repo)
32 self.repo = hg.repository(u, repo)
33 else:
33 else:
34 self.repo = repo
34 self.repo = repo
@@ -41,11 +41,6 b' def findrepos(paths):'
41 repos.append((name, path))
41 repos.append((name, path))
42 return repos
42 return repos
43
43
44 class wsgiui(ui.ui):
45 # default termwidth breaks under mod_wsgi
46 def termwidth(self):
47 return 80
48
49 class hgwebdir(object):
44 class hgwebdir(object):
50 refreshinterval = 20
45 refreshinterval = 20
51
46
@@ -63,7 +58,7 b' class hgwebdir(object):'
63 if self.baseui:
58 if self.baseui:
64 u = self.baseui.copy()
59 u = self.baseui.copy()
65 else:
60 else:
66 u = wsgiui()
61 u = webutil.wsgiui()
67 u.setconfig('ui', 'report_untrusted', 'off')
62 u.setconfig('ui', 'report_untrusted', 'off')
68 u.setconfig('ui', 'interactive', 'off')
63 u.setconfig('ui', 'interactive', 'off')
69
64
@@ -7,7 +7,7 b''
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, copy
9 import os, copy
10 from mercurial import match, patch, util, error
10 from mercurial import match, patch, util, error, ui
11 from mercurial.node import hex, nullid
11 from mercurial.node import hex, nullid
12
12
13 def up(p):
13 def up(p):
@@ -219,3 +219,8 b' class sessionvars(object):'
219 for key, value in self.vars.iteritems():
219 for key, value in self.vars.iteritems():
220 yield {'name': key, 'value': str(value), 'separator': separator}
220 yield {'name': key, 'value': str(value), 'separator': separator}
221 separator = '&'
221 separator = '&'
222
223 class wsgiui(ui.ui):
224 # default termwidth breaks under mod_wsgi
225 def termwidth(self):
226 return 80
General Comments 0
You need to be logged in to leave comments. Login now