Slow hgweb.cgi

Dominik Psenner dpsenner at gmail.com
Wed Apr 13 14:05:07 CDT 2011


So, hg serve is debuggable? How?

2011/4/13 Matt Mackall <mpm at selenic.com>:
> On Wed, 2011-04-13 at 15:52 +0200, Dominik Psenner wrote:
>> Off-list
>>
>> > -----Original Message-----
>> > From: Matt Mackall [mailto:mpm at selenic.com]
>> > Sent: Wednesday, April 13, 2011 3:42 PM
>> > To: Dominik Psenner
>> > Cc: 'Mercurial Developers'
>> > Subject: RE: Slow hgweb.cgi
>> >
>> > On Wed, 2011-04-13 at 15:13 +0200, Dominik Psenner wrote:
>> > > Adrian surrendered and I'm stuck. :-) Is it possible to debug the
>> > hgweb.cgi
>> > > script?
>> >
>> > It's quite difficult under a webserver, you might be able to get
>> > somewhere with 'hg serve'.
>> >
>> > Other tools you might find helpful are strace and wireshark.
>>
>> *hm* Can I "fake" the cgi script call done by the webserver by invoking the
>> python cgi script manually? I.e. stupidly I did this:
>
> You could, but it'd be a LOT easier to just run hg serve?
>
>> dominik at hgserver:/var/hg$ ./hgweb.cgi
>> Traceback (most recent call last):
>>   [...]
>>     if req.env['SCRIPT_NAME']:
>> KeyError: 'SCRIPT_NAME'
>>
>> And it tells me that I would have to set req.env['SCRIPT_NAME'] somehow. I'm
>> not familiar enough with python to get this done alone. So, would you help
>> me please? :-)
>
> That's just the normal shell environment. It's going to expect 10-20
> things set. If you're using bash, you just need:
>
>  export SCRIPT_NAME=blahblah
>  ...
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>



-- 
Dominik Psenner
## OpenPGP Key Signature #################################
# Key ID: B469318C                                       #
# Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
##########################################################


More information about the Mercurial-devel mailing list