cloning with ssh hangs when hgsubversion is enabled

Create issue
Issue #373 new
Jonathan Kotta created an issue
  • hgsubversion version: 68191be64af8
  • mercurial version: 2.4.1
$ mkdir foo
$ cd foo/
$ hg init
$ cd ..
$ hg clone ssh://$USER@$HOSTNAME/tmp/foo bar
jpkotta@shannon's password: 
no changes found
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
^CException KeyboardInterrupt: KeyboardInterrupt() in <bound method sshpeer.cleanup of <mercurial.sshpeer.sshpeer object at 0x1f31290>> ignored
$ hg showconfig

The clone hangs at sshpeer.cleanup, and I have to control-C to kill it. If I disable hgsubversion, the clone completes successfully. As far as I can tell, the repo is cloned successfully in either case.

Comments (5)

  1. Jonathan Kotta reporter

    It seems that setting ControlMaster to auto or yes in openssh is necessary to cause the problem. ControlMaster lets multiple ssh sessions share the same network connection. In the past, mercurial itself did not work with this option, but 2.4.1 works; I'm not sure when it started working.

  2. Bryan O'Sullivan

    Ugh, ControlMaster is not our friend. @dschleimer was using it for a while and ran into repeated hangs - so he just stopped using it.

  3. Sorin Ionuț Sbârnea

    Can someone provide more information about this, like links to know bugs or discussions? I do encounter the same problem but randomly with hg 2.4.2 and without hgsubversion (Mac OS X with ControlMaster enabled, obviously)... and I don't want to disable it. tx

    Here is an workaround that worked for me: moved ControlMaster to Host */* section of the ~/.ssh/config and for Host I added ControlMaster no and ControlPersist no.

    Now finally, hg works.

    This problem is very annoying, especially when you are using GUI tools like SourceTree and I do think that is has nothing to to with mercurial.

  4. Log in to comment