mercurial/ui.py
changeset 36834 1527f40de3b3
parent 36796 aa0fc12743c7
child 36910 98487ad0cf8b
--- 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