comparison contrib/dumprevlog @ 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 99e231afc29c
children c102b704edb5
comparison
equal deleted inserted replaced
45054:922dbf0df4f1 45055:4c1b4805db57
26 binopen.options = {} 26 binopen.options = {}
27 27
28 28
29 def printb(data, end=b'\n'): 29 def printb(data, end=b'\n'):
30 sys.stdout.flush() 30 sys.stdout.flush()
31 pycompat.stdout.write(data + end) 31 procutil.stdout.write(data + end)
32 32
33 33
34 for f in sys.argv[1:]: 34 for f in sys.argv[1:]:
35 r = revlog.revlog(binopen, encoding.strtolocal(f)) 35 r = revlog.revlog(binopen, encoding.strtolocal(f))
36 print("file:", f) 36 print("file:", f)