Index: llvm/utils/git-svn/git-llvm =================================================================== --- llvm/utils/git-svn/git-llvm +++ llvm/utils/git-svn/git-llvm @@ -93,6 +93,9 @@ log_verbose('Command took %0.1fs' % elapsed) + stdout = stdout.decode('utf-8') + stderr = stderr.decode('utf-8') + if p.returncode == 0: if stderr: eprint('`%s` printed to stderr:' % ' '.join(cmd)) @@ -191,8 +194,8 @@ # git is the only thing that can handle its own patches... log_verbose('Apply patch: %s' % diff) try: - shell(['git', 'apply', '-p2', '-'], cwd=svn_sr_path, stdin=diff, - die_on_failure=False) + shell(['git', 'apply', '-p2', '-'], cwd=svn_sr_path, + stdin=diff.encode('utf-8'), die_on_failure=False) except RuntimeError as e: eprint("Patch doesn't apply: maybe you should try `git pull -r` " "first?")