--- a/mercurial/ui.py Wed Jul 26 23:33:26 2017 -0400
+++ b/mercurial/ui.py Mon Jul 24 14:38:40 2017 -0400
@@ -1217,18 +1217,10 @@
self.write(prompt, prompt=True)
self.flush()
- # instead of trying to emulate raw_input, swap (self.fin,
- # self.fout) with (sys.stdin, sys.stdout)
- oldin = sys.stdin
- oldout = sys.stdout
- sys.stdin = self.fin
- sys.stdout = self.fout
# prompt ' ' must exist; otherwise readline may delete entire line
# - http://bugs.python.org/issue12833
with self.timeblockedsection('stdio'):
- line = raw_input(' ')
- sys.stdin = oldin
- sys.stdout = oldout
+ line = util.bytesinput(self.fin, self.fout, r' ')
# When stdin is in binary mode on Windows, it can cause
# raw_input() to emit an extra trailing carriage return