diff --git a/hggit/_ssh.py b/hggit/_ssh.py index 320ffeb5f38633d0a4702154fba8c38ee136f3f0_aGdnaXQvX3NzaC5weQ==..c7b17b2a433a351d489afa7a71194ca8f8ab84bf_aGdnaXQvX3NzaC5weQ== 100644 --- a/hggit/_ssh.py +++ b/hggit/_ssh.py @@ -1,6 +1,6 @@ from __future__ import absolute_import, print_function -from dulwich.client import SubprocessWrapper +from dulwich.client import SSHGitClient, SubprocessWrapper import subprocess from . import compat @@ -17,7 +17,8 @@ class _Vendor(SSHVendor): def run_command(self, host, command, username=None, port=None): - assert isinstance(command, basestring) + assert isinstance(command, compat.unicode) + command = command.encode(SSHGitClient.DEFAULT_ENCODING) sshcmd = ui.config(b"ui", b"ssh", b"ssh") args = compat.sshargs(sshcmd, host, username, port) cmd = b'%s %s %s' % (sshcmd, args, compat.shellquote(command))