Patchwork D6071: py3: convert KEY_PRESSED value to bytes in crecord.py

login
register
mail settings
Submitter phabricator
Date March 4, 2019, 11:09 p.m.
Message ID <differential-rev-PHID-DREV-iuw7xnkydaw2pzq4hapg-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39053/
State Superseded
Headers show

Comments

phabricator - March 4, 2019, 11:09 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This was a str before.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6071

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -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"]: