highlight: fixes garbled text in non-UTF-8 environment

Martin Geisler mg at lazybytes.net
Sat Sep 5 08:29:58 CDT 2009


Yuya Nishihara <youjah at gmail.com> writes:

> Christian Ebert wrote:
>> "hg serve" works here too. But hgwebdir.cgi loses all
>> highlighting (encoding is not the problem).
>
> okay, your problem is introduced by 57157a224037.
>
>> # HG changeset patch
>> # User Martin Geisler <mg at lazybytes.net>
>> # Date 1251490444 -7200
>> # Node ID 57157a224037523a6928e2c6456db8268518bf59
>> # Parent  70bf7f853adc6c042af7b83ad8cd72ff0cdf8159
>> highlight: move code from module top-level into extsetup

Ups, that's also my change :-( Thanks for pin-pointing it!

> it seems hgwebdir never call extsetup().
> Quick dirty hack is follows:
> --
> +++ b/hgwebdir.cgi
> @@ -9,6 +9,8 @@
>  # enable importing on demand to reduce startup time
>  from mercurial import demandimport; demandimport.enable()
>
> +from hgext.highlight import extsetup
> +extsetup()
>  # Uncomment to send python tracebacks to the browser if an error occurs:
>  #import cgitb
>  #cgitb.enable()

That is of course not a general solution, I'll see if I can get hgwebdir
to initialize the extensions correctly.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090905/30384da4/attachment.pgp 


More information about the Mercurial-devel mailing list