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

Pulkit Goyal 7895pulkit at gmail.com
Thu Mar 16 17:24:50 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 ec82445ccda47996e58a0c33fbbe8dbd7be0d2aa
# Parent  c894bad6625973565b21f556896527141f123dd5
commands: make sure using byteschr rather than ascii values

'MAR!?IC' is converted to their ascii values when slicing through it. This
patch uses pycompat.iterbytestr() to get bytes value.

diff -r c894bad66259 -r ec82445ccda4 mercurial/commands.py
--- a/mercurial/commands.py	Thu Mar 16 08:57:53 2017 +0530
+++ b/mercurial/commands.py	Thu Mar 16 09:13:13 2017 +0530
@@ -4757,7 +4757,7 @@
     stat = repo.status(node1, node2, m,
                        'ignored' in show, 'clean' in show, 'unknown' in show,
                        opts.get('subrepos'))
-    changestates = zip(states, 'MAR!?IC', stat)
+    changestates = zip(states, pycompat.iterbytestr('MAR!?IC'), stat)
 
     if (opts.get('all') or opts.get('copies')
         or ui.configbool('ui', 'statuscopies')) and not opts.get('no_status'):


More information about the Mercurial-devel mailing list