Enable SSH Compression For Mercurial

When sending or retrieving data using SSH, Git does compression for you. Mercurial does not automatically do compression. You should enable SSH compression as it can speed up things drastically, in some cases. To enable compression for Mercurial, do the following:

  • Open a terminal window.
  • Edit the Mercurial global configuration file (~/.hgrc).
  • Add the following line to the UI section:
    ssh = ssh -C
            
    

    When you are done the file should look similar to the following:

    [ui]
    # Name data to appear in commits
    username = Mary Anthony <manthony@atlassian.com>
    ssh = ssh -C
            
    
  • Save and close the file.