diff mercurial/crecord.py @ 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 82d9728ace95
children 7e95ade0f369
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"]: