[BUG] http proxy overriding problem / env var problem on the other OS
Edouard Gomez
ed.gomez at free.fr
Fri Aug 5 08:10:01 UTC 2005
K Thananchayan <thananck <at> yahoo.com> writes:
> Interesting! By the way, are you using stock python
> from python.org?
Yes.
> > No attachment sent
>
> Sorry. Please try the attached patch. I have also
> include some debug print statements to verify that
> hgrc settings override those of env.
Ok successfully applied.
Here's the output:
pulling from http://www.selenic.com/hg
Proxy environment vars: ['HTTP_PROXY=http://127.0.0.1:6666/', 'NO_PROXY=None',
'http_proxy=http://127.0.0.1:6666/', 'no_proxy=None']
Failed to delete environment variable HTTP_PROXY
Proxy environment vars: ['HTTP_PROXY=None', 'NO_PROXY=None', 'http_proxy=None',
'no_proxy=None']
opener: {'ftp': [<urllib2.FTPHandler instance at 0x0098CB70>], 'http':
[<urllib2.ProxyHandler instance at 0x0098CA58>, <urllib2.HTTPHandler instance at
0x0098CAD0>], 'file': [<urllib2.FileHandler instance at 0x0098CB48>], 'do':
[<urllib2.HTTPHandler instance at 0x0098CAD0>, <urllib2.HTTPSHandler instance at
0x0098CBC0>], 'unknown': [<urllib2.UnknownHandler instance at 0x0098CAA8>],
'proxy': [<urllib2.ProxyHandler instance at 0x0098CA58>], 'https':
[<urllib2.HTTPSHandler instance at 0x0098CBC0>]}
proxy handler: <urllib2.ProxyHandler instance at 0x0098CA58>
proxy_handler.http_open default args: ('http://127.0.0.1:6666/', 'http', <bound
method ProxyHandler.proxy_open of <urllib2.ProxyHandler instance at 0x0098CA58>>)
hgrc proxy settings: None
searching for changes
no changes found
> My digging seem to suggest that this is the case.
Yes that is.
See the output when i add a proxy section to my hgrc file:
pulling from http://www.selenic.com/hg
Proxy environment vars: ['HTTP_PROXY=http://127.0.0.1:6666/', 'NO_PROXY=None',
'http_proxy=http://127.0.0.1:6666/', 'no_proxy=None']
Failed to delete environment variable HTTP_PROXY
Proxy environment vars: ['HTTP_PROXY=None', 'NO_PROXY=None', 'http_proxy=None',
'no_proxy=None']
opener: {'ftp': [<urllib2.FTPHandler instance at 0x00988BE8>], 'http':
[<urllib2.ProxyHandler instance at 0x00988AA8>, <urllib2.HTTPHandler instance at
0x00988B48>], 'file': [<urllib2.FileHandler instance at 0x00988BC0>], 'do':
[<urllib2.HTTPHandler instance at 0x00988B48>, <urllib2.HTTPSHandler instance at
0x00988C38>], 'unknown': [<urllib2.UnknownHandler instance at 0x00988B20>],
'proxy': [<urllib2.ProxyHandler instance at 0x00988AA8>], 'https':
[<urllib2.HTTPSHandler instance at 0x00988C38>]}
proxy handler: <urllib2.ProxyHandler instance at 0x00988AA8>
proxy_handler.http_open default args: ('http://hgrchost:1234', 'http', <bound
method ProxyHandler.proxy_open of <urllib2.ProxyHandler instance at 0x00988AA8>>)
hgrc proxy settings: {'passwd': 'hgrcpasswd', '__name__': 'http_proxy', 'host':
'hgrchost:1234', 'user': 'hgrcuser'}
searching for changes
> Hope this is helpful.
This fixed the problem, i'd suggest reposting a cleaned patch as a [PATCH]
marked post for upstream applying. What i don't understand is why my try except
attempt was crashing python.exe, your code doesn't crash it :-( Anyway, this
another problem.
--
Edouard Gomez
More information about the Mercurial
mailing list