# HG changeset patch # User Yuya Nishihara # Date 2015-10-03 05:34:56 # Node ID 6bed17ba00a1b4cfbe7018337c94fe8171045b84 # Parent 21f977dbfaecaaef20336d123f9ba3f9414177d8 convert: have debugsvnlog obtain standard streams from ui This will help porting to Python 3, where sys.stdin/out/err are unfortunately unicode streams so we can't use them directly. diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -5,7 +5,6 @@ from __future__ import absolute_import import os import re -import sys import tempfile import xml.dom.minidom @@ -164,8 +163,8 @@ def debugsvnlog(ui, **opts): raise error.Abort(_('debugsvnlog could not load Subversion python ' 'bindings')) - args = decodeargs(sys.stdin.read()) - get_log_child(sys.stdout, *args) + args = decodeargs(ui.fin.read()) + get_log_child(ui.fout, *args) class logstream(object): """Interruptible revision log iterator."""