views:

135

answers:

2

I'm trying to push a changeset from a local Mercurial repository created with TortoiseHg to a remote Git repository. I have hg-git installed and configured and it will pull just fine. But when I run the push it gives me this

Command

hg push git+ssh://git@dummyrepo:username/repo.git

Result

pushing to git+ssh://git@dummyrepo:username/repo.git
importing Hg objects into Git
creating and sending data
abort: the remote end hung up unexpectedly

There are several things I've done to get to this point. But I'm hoping to resolve this last thing because I find TortoiseHg to be much easier to work with than any of the Git tools out there (for windows.)

  • Installed TortoiseHg
  • Pulled down the hg-git from http://bitbucket.org/durin42/hg-git/
  • Configured mercurial.ini to point to the hg-git library
  • Pulled down dulwich source from git://git.samba.org/jelmer/dulwich.git
  • Compiled dulwich and put it into library.zip for TortoiseHg
  • Configured TortoiseHg to use TortoisePlink.exe for ssh
  • Added my private key to Pageant

Any ideas what I could be missing?

A: 

What does wireshark have to say? Can you provide a dump of the tcp connection that comes from hg? Most likely, the guys in #mercurial on freenode in irc will be able to help.

xyld
Thanks for the tip. I'll check out #mercurial to see if they are any help. As for the TCP dump I can run wireshark but I'm not sure what I would provide that would be helpful from there. I see the ssh communication going through.
Nathan Palmer
@nathan ah yeah, wasn't thinking about the ssh part. wireshark will be useless there, but you might consider running `hg push --debug ...` or `hg push -e 'ssh -vvv` --debug ...`. Not sure if either will help, but it may shed some light.
xyld
A: 

Did you configure Dulwich to use plink.exe instead of ssh.exe (OpenSSH) ?

I just hacked my copy of Dulwich directly:

client.py:

    def connect_ssh(self, host, command, username=None, port=None):
    #FIXME: This has no way to deal with passwords..
    args = ['C:\\Program Files (x86)\\PuTTY\\plink.exe', '-x', '-batch']

Also, you have to make 1 connection via PuTTY to cache the git servers public key first.

sylvanaar