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: ]

Comments:

Post a Comment:
Comments are closed for this entry.
About

sch

Search

Archives
« July 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today
External blogs