# HG changeset patch # User Yuya Nishihara # Date 1408851353 -32400 # Node ID 3b39e1522d8f967d5f829e83d53adbc252af2e57 # Parent dcb95aadf8505aa813039af0dfd18ad9c1de2c47 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. diff -r dcb95aadf850 -r 3b39e1522d8f mercurial/ui.py --- 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