From 59ad50c6d07c02bbcda69a6884c6f3153bb2326c Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Fri, 5 Aug 2022 19:21:09 -0500 Subject: [PATCH] Encode more stuff Signed-off-by: Felipe Contreras --- git-remote-hg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-remote-hg b/git-remote-hg index 244273d..cc47044 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -116,7 +116,7 @@ def get_config(config): cmd = ['git', 'config', '--get', config] process = subprocess.Popen(cmd, stdout=subprocess.PIPE) output, _ = process.communicate() - return output + return output.decode() def get_config_bool(config, default=False): value = get_config(config).rstrip('\n') @@ -1003,7 +1003,7 @@ def write_tag(repo, tag, node, msg, author): cmd = ['git', 'var', 'GIT_COMMITTER_IDENT'] process = subprocess.Popen(cmd, stdout=subprocess.PIPE) output, _ = process.communicate() - m = re.match('^.* <.*>', output) + m = re.match(b'^.* <.*>', output) if m: user = m.group(0) else: @@ -1361,7 +1361,7 @@ def main(args): if alias[4:] == url: is_tmp = True - alias = hashlib.sha1(alias).hexdigest() + alias = hashlib.sha1(alias.encode()).hexdigest() dirname = os.path.join(gitdir, 'hg', alias) branches = {}