Mercurial > hg > hg-git
diff hggit/git_handler.py @ 369:e5c743cd0da1
pass hg's ui.ssh config to dulwich
This allows Windows users to override dulwich's default (the unix-y
ssh).
author | Tay Ray Chuan <rctay89@gmail.com> |
---|---|
date | Wed, 22 Dec 2010 16:57:26 -0600 (2010-12-22) |
parents | ae78f94f64fd |
children | f008197045d3 |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -13,6 +13,7 @@ from mercurial import context, util as hgutil from mercurial import error +import _ssh import util class GitHandler(object): @@ -68,7 +69,6 @@ file.write("%s %s\n" % (gitsha, hgsha)) file.rename() - def load_tags(self): self.tags = {} if os.path.exists(self.repo.join(self.tagsfile)): @@ -890,6 +890,10 @@ return string.decode('ascii', 'replace').encode('utf-8') def get_transport_and_path(self, uri): + # pass hg's ui.ssh config to dulwich + if not issubclass(client.get_ssh_vendor, _ssh.SSHVendor): + client.get_ssh_vendor = _ssh.generate_ssh_vendor(self.ui) + for handler, transport in (("git://", client.TCPGitClient), ("git@", client.SSHGitClient), ("git+ssh://", client.SSHGitClient)):