[PATCH 6 of 6 py3] commands: make sure using byteschr rather than ascii values

Pulkit Goyal 7895pulkit at gmail.com
Thu Mar 16 00:13:21 EDT 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1489635793 -19800
#      Thu Mar 16 09:13:13 2017 +0530
# Node ID 63aeb39b5802644ae99eaa5cf0666f3bf5cc4e90
# Parent  b5673a08993652a92c0e20a4e24d842194872454
commands: make sure using byteschr rather than ascii values

'MAR!?IC' is converted to their ascii values when slicing through it. This
patch converts them back to bytes string.

diff -r b5673a089936 -r 63aeb39b5802 mercurial/commands.py
--- a/mercurial/commands.py	Thu Mar 16 09:00:27 2017 +0530
+++ b/mercurial/commands.py	Thu Mar 16 09:13:13 2017 +0530
@@ -4768,6 +4768,8 @@
     showchar = not opts.get('no_status')
 
     for state, char, files in changestates:
+        if pycompat.ispy3:
+            char = bytes([char])
         if state in show:
             label = 'status.' + state
             for f in files:


More information about the Mercurial-devel mailing list