mercurial forest extension doesn't honor "http_proxy" environment variable

Volker Simonis volker.simonis at
Mon Dec 17 13:58:14 UTC 2007


I just had a real hard time to get the forest extension working and
finally found out that it was because the forest extension doesn't
honor the  "http_proxy" environment variable. So I thought I'll post
it here in case anybody else will face the same problem in order to
save him some time. (If you're only interested in the solution of the
problem, you can skip the next paragraphs and jump right to the end of
this post).

I installed Mercurial and the forest extension as described in various
places, here on the list and on the Web - that was the easy part:)
Afterwards I could do:

/share/software/OpenJDK> hg clone jdk7
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 26 changes to 26 files
26 files updated, 0 files merged, 0 files removed, 0 files unresolved

So everything worked fine! Note that I'm behind a firewall, but
Mercurial correctly picked up my http proxy from the  "http_proxy"
environment variable!

But now, everytime I tried 'fclone', I got the following error:

/share/software/OpenJDK> hg fclone jdk7
abort: error: Name or service not known

That was not amusing. First I thought I got something wrong during the
installation of the forest extension. I than used the '--traceback'
option to "hg" which told me that the error was  in

/share/software/OpenJDK> hg --traceback fclone jdk7
Traceback (most recent call last):
File "/share/software/Python-2.5.1_bin/lib/python2.5/site-packages/mercurial/",
line 328, in _start_transaction
    raise urllib2.URLError(err)
URLError: <urlopen error (-2, 'Name or service not known')>
abort: error: Name or service not known

So I enabled the debugging output in and realized, that
the first two connections to where made trough the
proxy, while the third one (the first that actually fetches files),
wants to go directly to, which badly fails:

/share/software/OpenJDK> hg fclone jdk7 -  creating new connection to proxy:8080 (1078835788) -  STATUS: 200, OK -  re-using connection to proxy:8080 (1078835788) -  STATUS: 200, OK
[.] -  creating new connection to (1078970092)
abort: error: Name or service not known

The problem can be fixed by adding the proxy settings  to your .hgrc
file, like this:


where you have to replace "proxy:8080" with the name and the port of
your real proxy host!

@Simon: I took your email address from Forest Extension Wiki page at where
you're listed as maintainer of the forest extension. Could you be so
kind to have a look at this problem and fix it if possible.


More information about the build-dev mailing list