py3: use sys.stdout.buffer for binary output in tests/svnxml.py
Just following
6c0b1d964537ab62d76c208f5f04ab414814c94e here.
Differential Revision: https://phab.mercurial-scm.org/D5027
--- a/tests/svnxml.py Sat Oct 13 03:58:20 2018 +0300
+++ b/tests/svnxml.py Sat Oct 13 03:59:15 2018 +0300
@@ -35,7 +35,10 @@
return entries
def printentries(entries):
- fp = sys.stdout
+ try:
+ fp = sys.stdout.buffer
+ except AttributeError:
+ fp = sys.stdout
for e in entries:
for k in ('revision', 'author', 'msg'):
fp.write(('%s: %s\n' % (k, e[k])).encode('utf-8'))