Mercurial > hg
changeset 22291:3b39e1522d8f
ui: add brief comment why raw_input() needs dummy ' ' prompt string
Retrieved from 17ffb30d9174.
I was about to move ' ' to label(msg + ' ', 'ui.prompt') so that subclass can
distinguish prompt output from data. But it was not that simple.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 24 Aug 2014 12:35:53 +0900 |
parents | dcb95aadf850 |
children | 102f0e926668 |
files | mercurial/ui.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/ui.py Sun Aug 24 23:47:26 2014 +0900 +++ b/mercurial/ui.py Sun Aug 24 12:35:53 2014 +0900 @@ -626,6 +626,8 @@ 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 line = raw_input(' ') sys.stdin = oldin sys.stdout = oldout