Predictable
Stephen Hahn's blog at Sun Microsystems
All | Pastime | Person | Peruse | Position | Process | Product

« OpenSolaris: Documen... | Main | 53 looks good »
20061109 Thursday November 09, 2006

Tip: Mercurial atop ssh

On opensolaris.org, we host Mercurial and Subversion via their ability to tunnel through an SSH connection. A slight gotcha with Mercurial is that it turns off compression when tunnelled through SSH, as described in hg(1):

$ man hg
....
    - Mercurial doesn't use its own compression via SSH; the right thing
      to do is to configure it in your ~/.ssh/ssh_config, e.g.:
        Host *.mylocalnetwork.example.com
          Compression off
        Host *
          Compression on
    
      Alternatively specify "ssh -C" as your ssh command in your hgrc or
      with the --ssh command line option.
....

For pulls of a large repository, such as ON, compression changes an approximately 51 minute operation to a 17 minute operation. So you'll want something like

$ cat ~/.ssh/config
....
Host hg.opensolaris.org
    Compression yes
    ...
....
in your SSH configuration.

[ T: ]

(2006-11-09 10:41:49.0) Permalink
Comments:

Post a Comment:

Comments are closed for this entry.
Stephen Hahn
Sun Microsystems
sch@sun.com
17 Network Circle
MS MPK17-301
Menlo Park CA 94025 USA