changeset 30261:6bed17ba00a1

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.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 03 Oct 2015 14:34:56 +0900
parents 21f977dbfaec
children bc5d0e6fd9f3
files hgext/convert/subversion.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Sat Oct 03 14:29:13 2015 +0900
+++ b/hgext/convert/subversion.py	Sat Oct 03 14:34:56 2015 +0900
@@ -5,7 +5,6 @@
 
 import os
 import re
-import sys
 import tempfile
 import xml.dom.minidom
 
@@ -164,8 +163,8 @@
         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."""