Mercurial > public > mercurial-scm > hg
diff hgext/releasenotes.py @ 45055:4c1b4805db57
pycompat: change users of pycompat.{stdin,stdout,stderr} to use procutil.std*
On Python 3, pycompat.{stdin,stdout,stderr} are usually block-buffered even if
connected to a TTY. procutil.{stdin,stdout,stderr} provide consistent behavior
across platforms and Python versions.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Mon, 06 Jul 2020 17:44:25 +0200 |
parents | d4c1501225c4 |
children | 59fa3890d40a |
line wrap: on
line diff
--- a/hgext/releasenotes.py Mon Jul 06 10:30:55 2020 +0200 +++ b/hgext/releasenotes.py Mon Jul 06 17:44:25 2020 +0200 @@ -30,7 +30,10 @@ scmutil, util, ) -from mercurial.utils import stringutil +from mercurial.utils import ( + procutil, + stringutil, +) cmdtable = {} command = registrar.command(cmdtable) @@ -689,7 +692,7 @@ def debugparsereleasenotes(ui, path, repo=None): """parse release notes and print resulting data structure""" if path == b'-': - text = pycompat.stdin.read() + text = procutil.stdin.read() else: with open(path, b'rb') as fh: text = fh.read()