##// END OF EJS Templates
configitems: register the 'web.encoding' config
Boris Feld -
r34236:344fd1fe default
parent child Browse files
Show More
@@ -10,6 +10,7 b' from __future__ import absolute_import'
10 import functools
10 import functools
11
11
12 from . import (
12 from . import (
13 encoding,
13 error,
14 error,
14 )
15 )
15
16
@@ -618,6 +619,9 b" coreconfigitem('web', 'descend',"
618 coreconfigitem('web', 'description',
619 coreconfigitem('web', 'description',
619 default="",
620 default="",
620 )
621 )
622 coreconfigitem('web', 'encoding',
623 default=lambda: encoding.encoding,
624 )
621 coreconfigitem('worker', 'backgroundclose',
625 coreconfigitem('worker', 'backgroundclose',
622 default=dynamicdefault,
626 default=dynamicdefault,
623 )
627 )
@@ -320,7 +320,7 b' class hgweb(object):'
320 rctx = requestcontext(self, repo)
320 rctx = requestcontext(self, repo)
321
321
322 # This state is global across all threads.
322 # This state is global across all threads.
323 encoding.encoding = rctx.config('web', 'encoding', encoding.encoding)
323 encoding.encoding = rctx.config('web', 'encoding')
324 rctx.repo.ui.environ = req.env
324 rctx.repo.ui.environ = req.env
325
325
326 if rctx.csp:
326 if rctx.csp:
@@ -170,8 +170,7 b' class hgwebdir(object):'
170
170
171 self.repos = repos
171 self.repos = repos
172 self.ui = u
172 self.ui = u
173 encoding.encoding = self.ui.config('web', 'encoding',
173 encoding.encoding = self.ui.config('web', 'encoding')
174 encoding.encoding)
175 self.style = self.ui.config('web', 'style', 'paper')
174 self.style = self.ui.config('web', 'style', 'paper')
176 self.templatepath = self.ui.config('web', 'templates', None)
175 self.templatepath = self.ui.config('web', 'templates', None)
177 self.stripecount = self.ui.config('web', 'stripes', 1)
176 self.stripecount = self.ui.config('web', 'stripes', 1)
General Comments 0
You need to be logged in to leave comments. Login now