hgweb.cgi requires encoded config string?

Harald Klimach harald at klimachs.de
Wed Jul 29 10:09:35 UTC 2020


Hi,

I ran into a problem with hgweb.cgi in Mercurial 5.3.2 with Python 3.7.7
on OpenBSD 6.7: It complained that mercurial only accepts encoded strings.
I fixed this by adding a .encode("utf-8") to the config string, but this
is not mentioned in the hgweb.cgi template installed along with
Mercurial 5.3.2, and it looks this is also not the case in the latest
repository version of hgweb.cgi.

I just changed
application = hgweb(config)
to
application = hgweb(config.encode("utf-8"))

Is this the correct approach? And if so, wouldn't it be appropriate to
suggest something similar in the hgweb.cgi file?

Thanks,
Harald



More information about the Mercurial mailing list