# HG changeset patch # User Manuel Jacob # Date 2020-07-10 07:59:36 # Node ID 00cdac66961432877ec6da4a3495b41b65675899 # Parent 8628cd1122d22567ccaf467bcc2aa5a0e44a4715 procutil: split if condition This prepares the code for subsequent changes where we need to differentiate between the two cases. diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py +++ b/mercurial/utils/procutil.py @@ -98,9 +98,11 @@ if pycompat.iswindows: # destined stdout with a pipe destined stdout (e.g. pager), we want line # buffering. if isatty(stdout): - if pycompat.ispy3 or pycompat.iswindows: + if pycompat.ispy3: # Python 3 implements its own I/O streams. # The standard library doesn't offer line-buffered binary streams. + stdout = make_line_buffered(stdout) + elif pycompat.iswindows: # Python 2 uses the I/O streams provided by the C library. # The Windows C runtime library doesn't support line buffering. stdout = make_line_buffered(stdout)