# HG changeset patch # User Denis Laxalde # Date 2019-11-06 16:12:13 # Node ID 117b41b1859d780f975fba635f44f8bb66298632 # Parent 92e24a139eccdcfc290647dd3998244921ab931b 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. diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -1741,8 +1741,8 @@ are you sure you want to review/edit and 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