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

Christian Ebert blacktrash at gmx.net
Sat Sep 5 09:39:36 CDT 2009


* Yuya Nishihara on Saturday, September 05, 2009 at 21:56:56 +0900
> 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
> 
> 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()

Right. Now I wonder why highlighting worked with 57157a224037
before 799373ff2554 was applied? Why does highlight need extsetup
with your patch?

c
-- 
\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
                     Ein deutscher Western/A German Western
Next show: 18 September 2009 --->>    http://goldkante.org/
         --->> http://www.blacktrash.org/underdogma/ccc.php


More information about the Mercurial-devel mailing list