mercurial/utils/__init__.py
author Yuya Nishihara <yuya@tcha.org>
Tue, 06 Mar 2018 02:38:53 -0600
changeset 36803 9b513888ea23
parent 36636 c6061cadb400
permissions -rw-r--r--
ui: do not use rawinput() when we have to replace sys.stdin/stdout See the inline comment for why. The current Python3 hack doesn't work if more than one user inputs are expected because TextIOWrapper fills its internal buffer at the first read() request. Maybe we could write an unbuffered TextIOWrapper, but I don't want to make things more complicated. Instead, this patch reinvents raw_input(' ') of no readline support.