Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commandserver.py @ 44187:98c14f0108b8 stable
py3: fix EOL detection in commandserver.channeledinput
This breaks TortoiseHg's email preview which sends b'\n' while readline
request is issued and the loop never ends. Spotted by Matt Harbison.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 24 Feb 2020 13:28:49 +0900 |
parents | 9f70512ae2cf |
children | f5c006621f07 |
line wrap: on
line diff
--- a/mercurial/commandserver.py Thu Feb 20 16:21:00 2020 -0800 +++ b/mercurial/commandserver.py Mon Feb 24 13:28:49 2020 +0900 @@ -160,7 +160,7 @@ buf = s # keep asking for more until there's either no more or # we got a full line - while s and s[-1] != b'\n': + while s and not s.endswith(b'\n'): s = self._read(size, b'L') buf += s