diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-28 10:54:41 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-28 10:54:47 +0100 |
commit | 20a408ca99dad3cbb8c1cea0fe5c3d52f328061e (patch) | |
tree | be93cd37675c6cebc307df8cdb7d9cd368cf6042 | |
parent | 4a46bdc0feaa66f41e921745408663d838847f71 (diff) | |
parent | c8a6c11d6d4c5910dca14135d466efc5c40f519c (diff) |
Merge #7425: devtools: Fix utf-8 support in messages for github-merge
c8a6c11 devtools: Fix utf-8 support in messages for github-merge (Wladimir J. van der Laan)
-rwxr-xr-x | contrib/devtools/github-merge.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py index f7781cceb3..c8dcaae268 100755 --- a/contrib/devtools/github-merge.py +++ b/contrib/devtools/github-merge.py @@ -147,14 +147,14 @@ def main(): else: firstline = 'Merge #%s' % (pull,) message = firstline + '\n\n' - message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]) + message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8') try: - subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message,head_branch]) + subprocess.check_call([GIT,'merge','-q','--commit','--no-edit','--no-ff','-m',message.encode('utf-8'),head_branch]) except subprocess.CalledProcessError as e: print("ERROR: Cannot be merged cleanly.",file=stderr) subprocess.check_call([GIT,'merge','--abort']) exit(4) - logmsg = subprocess.check_output([GIT,'log','--pretty=format:%s','-n','1']) + logmsg = subprocess.check_output([GIT,'log','--pretty=format:%s','-n','1']).decode('utf-8') if logmsg.rstrip() != firstline.rstrip(): print("ERROR: Creating merge failed (already merged?).",file=stderr) exit(4) |