I have 4 ideas (3 fancy ones)
- tolocal has an encoding parameter. Usability=0 as it has to be passed from web
down to util.
- tolocal does something like a stack inspection. Called from web it switches to
web:encoding.
- tolocal internally uses util._encoding. util needs to know somehow if used for
web or not. While util is initialized it can try to modify the encoding.
(probably the best idea)
If anyone uses the "--encoding=xyz" parameter the util._encoding is changed
inside dispatch.py
util._encoding = options["encoding"]
if "hg serve" is the only command that is related to the web category then
dispatch should modify util._encoding (maybe before the line before). |