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.
--- 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