ui: remove any combinations of CR|LF from prompt response
On Windows, we have to accept both CR+LF and LF. This patch simply makes
any trailing CRs and LFs removed from a user input instead of doing stricter
parsing, as an input must be a readable text.
--- a/mercurial/ui.py Sat Mar 10 12:45:10 2018 -0500
+++ b/mercurial/ui.py Sat Mar 10 15:50:09 2018 +0900
@@ -1296,8 +1296,7 @@
line = self.fin.readline()
if not line:
raise EOFError
- if line.endswith(pycompat.oslinesep):
- line = line[:-len(pycompat.oslinesep)]
+ line = line.rstrip(pycompat.oslinesep)
return line