# HG changeset patch # User Boris Feld # Date 1498787144 -7200 # Node ID 344fd1fe237baf46875d99908b0ed3ba7dd7d54a # Parent a6c18628dff1fe928cabe9cecc7f83834528ffa1 configitems: register the 'web.encoding' config diff -r a6c18628dff1 -r 344fd1fe237b mercurial/configitems.py --- a/mercurial/configitems.py Fri Jun 30 03:45:43 2017 +0200 +++ b/mercurial/configitems.py Fri Jun 30 03:45:44 2017 +0200 @@ -10,6 +10,7 @@ import functools from . import ( + encoding, error, ) @@ -618,6 +619,9 @@ coreconfigitem('web', 'description', default="", ) +coreconfigitem('web', 'encoding', + default=lambda: encoding.encoding, +) coreconfigitem('worker', 'backgroundclose', default=dynamicdefault, ) diff -r a6c18628dff1 -r 344fd1fe237b mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Fri Jun 30 03:45:43 2017 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Fri Jun 30 03:45:44 2017 +0200 @@ -320,7 +320,7 @@ rctx = requestcontext(self, repo) # This state is global across all threads. - encoding.encoding = rctx.config('web', 'encoding', encoding.encoding) + encoding.encoding = rctx.config('web', 'encoding') rctx.repo.ui.environ = req.env if rctx.csp: diff -r a6c18628dff1 -r 344fd1fe237b mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Fri Jun 30 03:45:43 2017 +0200 +++ b/mercurial/hgweb/hgwebdir_mod.py Fri Jun 30 03:45:44 2017 +0200 @@ -170,8 +170,7 @@ self.repos = repos self.ui = u - encoding.encoding = self.ui.config('web', 'encoding', - encoding.encoding) + encoding.encoding = self.ui.config('web', 'encoding') self.style = self.ui.config('web', 'style', 'paper') self.templatepath = self.ui.config('web', 'templates', None) self.stripecount = self.ui.config('web', 'stripes', 1)