I have switched our internal codebase to use Mercurial, with a hosted remote repository. I’ve read that using Mercurial over SSH instead of HTTPS is faster because the data is compressed before it is sent. But… compared to HTTPS, it’s quite a pain to set up, especially on Windows.
For those of you who have used both regularly on large projects…
- Is the performance gain worth the headache of setting up public/private keys for each user,
and dealing with other finicky
configuration issues? - Is there even
a noticeable performance gain? I
haven’t seen one on smaller
projects. - Is SSH more secure?
- Would you enforce a policy of using one
over the other, or let each
developer choose?
Yes for a very large repository, it is recommended that you use SSH as Mercurial for large repo. Mercurial is able to compress data being sent for both ssh and https, so you can push and pull faster. Also, by default, Mercurial does not use compression when sending or retrieving data via SSH.You will need to enable it via configuration.
There are two ways you can do this:
In.hgrc
To specify it in your SSH config file, edit ~/.ssh/config
All said, HTTPS setup is easy. If you have it, just use it, unless you are going to write mega ton frameworks.