Mercurial > hg-stable
changeset 43423:117b41b1859d stable
py3: compare response of crecord's confirmationwindow with str
confirmationwindow() returns a native string, as a result of calling
chr() on getch(). On Python 3, response.lower().startswith(b"y") leads
to a TypeError.
This fixes a crash when typing "r" in the curses interface of
interactive commit.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Wed, 06 Nov 2019 17:12:13 +0100 |
parents | 92e24a139ecc |
children | 7cc913396f8c |
files | mercurial/crecord.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/crecord.py Thu Nov 07 08:58:26 2019 +0100 +++ b/mercurial/crecord.py Wed Nov 06 17:12:13 2019 +0100 @@ -1741,8 +1741,8 @@ with self.ui.timeblockedsection(b'crecord'): response = self.confirmationwindow(confirmtext) if response is None: - response = b"n" - if response.lower().startswith(b"y"): + response = "n" + if response.lower().startswith("y"): return True else: return False