changeset 41843:25420df87903

py3: convert KEY_PRESSED value to bytes in crecord.py This was a str before. Differential Revision: https://phab.mercurial-scm.org/D6071
author Pulkit Goyal <pulkit@yandex-team.ru>
date Tue, 05 Mar 2019 04:11:32 +0530
parents 28842adf8ed5
children 2105ed01c431
files mercurial/crecord.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/crecord.py	Mon Mar 04 18:11:50 2019 -0500
+++ b/mercurial/crecord.py	Tue Mar 05 04:11:32 2019 +0530
@@ -20,6 +20,7 @@
     encoding,
     error,
     patch as patchmod,
+    pycompat,
     scmutil,
     util,
 )
@@ -1667,6 +1668,7 @@
 
         Return true to exit the main loop.
         """
+        keypressed = pycompat.bytestr(keypressed)
         if keypressed in ["k", "KEY_UP"]:
             self.uparrowevent()
         if keypressed in ["K", "KEY_PPAGE"]: