# HG changeset patch # User Manuel Jacob <me@manueljacob.de> # Date 1583539624 -3600 # Sat Mar 07 01:07:04 2020 +0100 # Node ID c7b17b2a433a351d489afa7a71194ca8f8ab84bf # Parent 320ffeb5f38633d0a4702154fba8c38ee136f3f0 py3: convert from unicode to bytes diff --git a/hggit/_ssh.py b/hggit/_ssh.py --- 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))