changeset 45083:b6afe1c52964

procutil: move comment closer to relevant code
author Manuel Jacob <me@manueljacob.de>
date Fri, 10 Jul 2020 10:12:56 +0200
parents 29a905fe23ae
children 3a6ec080b521
files mercurial/utils/procutil.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/procutil.py	Fri Jul 10 10:03:05 2020 +0200
+++ b/mercurial/utils/procutil.py	Fri Jul 10 10:12:56 2020 +0200
@@ -91,9 +91,6 @@
     stdout = sys.stdout
     stderr = sys.stderr
 
-# glibc determines buffering on first write to stdout - if we replace a TTY
-# destined stdout with a pipe destined stdout (e.g. pager), we want line
-# buffering.
 if isatty(stdout):
     if pycompat.ispy3:
         # Python 3 implements its own I/O streams.
@@ -106,6 +103,9 @@
         # The Windows C runtime library doesn't support line buffering.
         stdout = make_line_buffered(stdout)
     else:
+        # glibc determines buffering on first write to stdout - if we
+        # replace a TTY destined stdout with a pipe destined stdout (e.g.
+        # pager), we want line buffering.
         stdout = os.fdopen(stdout.fileno(), 'wb', 1)