mercurial/ui.py
branchstable
changeset 43377 aaa046919043
parent 43265 82879e06c926
child 43506 9f70512ae2cf
equal deleted inserted replaced
43376:b27cf9f52194 43377:aaa046919043
  1562 
  1562 
  1563         # prompt ' ' must exist; otherwise readline may delete entire line
  1563         # prompt ' ' must exist; otherwise readline may delete entire line
  1564         # - http://bugs.python.org/issue12833
  1564         # - http://bugs.python.org/issue12833
  1565         with self.timeblockedsection(b'stdio'):
  1565         with self.timeblockedsection(b'stdio'):
  1566             if usereadline:
  1566             if usereadline:
       
  1567                 self.flush()
  1567                 prompt = encoding.strfromlocal(prompt)
  1568                 prompt = encoding.strfromlocal(prompt)
  1568                 line = encoding.strtolocal(pycompat.rawinput(prompt))
  1569                 line = encoding.strtolocal(pycompat.rawinput(prompt))
  1569                 # When stdin is in binary mode on Windows, it can cause
  1570                 # When stdin is in binary mode on Windows, it can cause
  1570                 # raw_input() to emit an extra trailing carriage return
  1571                 # raw_input() to emit an extra trailing carriage return
  1571                 if pycompat.oslinesep == b'\r\n' and line.endswith(b'\r'):
  1572                 if pycompat.oslinesep == b'\r\n' and line.endswith(b'\r'):