Wednesday, June 16, 2010

Mercurial behind a proxy server

I found some web resources that confused things when I was trying to figure this out so I thought I'd add a page.

Mercurial (hg) stores its config information in an ini file. Type
hg help config
to see the details.

Based on this its possible to have a config file per repo with differetn setting (e.g. email addresses).

The format of the config file is explained at
http://www.selenic.com/mercurial/hgrc.5.html

So to set a proxy server I used the follwoing ini file

[ui]
username = My Name <my.name@myemail.com>
verbose = True
[http_proxy]
host=http://<proxyhost>:<proxyport>
no=192.168.*
user=<optionalusername>
passwd=<optionalpassword>