tobyandlauren.id.au

BLOG PROJECTS FAMILY TREE
Subscribe by RSS feed

Mercurial: hg --config option

Incredibly short and simple, but I just couldn’t find anything about the proper usage of the hg --config option for Mercurial and now that I’ve worked it out I might save someone else forty-five seconds of life by posting it here.

Let’s say, like me, you’re stuck behind an authenticated HTTP proxy and have the host and username set up in your ~/.hgrc file, but don’t want to store your password in that file, your hg clone line should be:

hg clone --config http_proxy.passwd=[_password_] http://[_respository-URL_]/ [_working-copy-name_]

In other words, it’s section.name=value, to use the same terms as man hgrc.