title: Configuring mercurial to use a proxy gives error "abort: error: ''"
body: <p>Adding a proxy section to my ~/.hgrc file doesn't seem to work, nor does
  setting the proxy on the command line; e.g. </p>
  
  <pre><code>$ hg --config=http_proxy.host=http://127.0.0.1:8181 incoming
  </code></pre>
  
  <p>The proxy section in my ~/.hgrc file looks like:</p>
  
  <pre><code>[http_proxy]
  host=http://localhost:8181  
  </code></pre>
  
  <p>Instead, I get a not so informative response printed to stderr:</p>
  
  <pre><code>abort: error: ''
  </code></pre>
  
  <p>After some investigation, (adding --debug --traceback) I found this error
  happens in the keepalive.py file of one of the underlying python library files.</p>
  
  <p>I have Firefox/foxyproxy set up to use this same proxy, and everything works
  fine - the port number [and host] is correct.</p>