py3: convert KEY_PRESSED value to bytes in crecord.py
authorPulkit Goyal <pulkit@yandex-team.ru>
Tue, 05 Mar 2019 04:11:32 +0530
changeset 41843 25420df87903
parent 41842 28842adf8ed5
child 41844 2105ed01c431
py3: convert KEY_PRESSED value to bytes in crecord.py This was a str before. Differential Revision: https://phab.mercurial-scm.org/D6071
mercurial/crecord.py
--- 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"]: