[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: hg and ssh ControlPersist
From:       Isaac Jurado <diptongo () gmail ! com>
Date:       2013-09-15 17:09:52
Message-ID: 20130915170952.GB3929 () findus
[Download RAW message or body]

Replying Isaac Jurado:
> Replying Antoine Pitrou:
>>
>> Hello,
>>
>> I'm trying to have ssh automatically keep a session open in the
>> background to make my remote hg operations faster, using the
>> following ssh_config snippet:
>>
>>   ControlPath ~/.ssh/cm_socket/%r_%h_%p
>>   ServerAliveInterval 60
>>   ControlPersist 1h
>>
>> It works ok, except that everytime I connect for the *first* time to
>> a server, I have to interrupt the session using Ctrl-C at the end
>> (otherwise it waits forever):
>>
>> $ hg pull
>> pulling from ssh://hg@hg.python.org/peps
>> searching for changes
>> aucun changement trouv=E9
>> [ here I have to interrupt the session: ]
>> ^CException KeyboardInterrupt: KeyboardInterrupt() in <bound method
>> sshpeer.cleanup of <mercurial.sshpeer.sshpeer object at 0x268e190>> igno=
red
>>
>>
>> Does anyone know of a trick to avoid having to interrupt the first
>> session, but still spawn it lazily?  (from my investigation, it seems
>> ssh keeps the hg client's standard streams open even though the
>> server command finished)
>
> I had the same problem at work, so I added a session start-up script
> that created the control master connection:
>
>     ssh -MN myreposerver

Sorry, this should be:

    ssh -fMN myreposerver

-- =

Isaac Jurado

"The noblest pleasure is the joy of understanding."
                                  Leonardo da Vinci
_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic