cmdutil: use ui descriptors in makefileobj
authorIdan Kamara <idankk86@gmail.com>
Wed, 08 Jun 2011 14:54:52 +0300
changeset 14637 5e9d691229d5
parent 14636 b98063487a6f
child 14638 1bdbca0b6604
cmdutil: use ui descriptors in makefileobj
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Wed Jun 08 14:54:52 2011 +0300
+++ b/mercurial/cmdutil.py	Wed Jun 08 14:54:52 2011 +0300
@@ -160,7 +160,7 @@
     writable = mode not in ('r', 'rb')
 
     if not pat or pat == '-':
-        fp = writable and sys.stdout or sys.stdin
+        fp = writable and repo.ui.fout or repo.ui.fin
         return os.fdopen(os.dup(fp.fileno()), mode)
     if hasattr(pat, 'write') and writable:
         return pat