<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mar 16, 2017 00:18, "Pulkit Goyal" <<a href="mailto:7895pulkit@gmail.com">7895pulkit@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div class="quoted-text">On Thu, Mar 16, 2017 at 10:14 AM, Martin von Zweigbergk <span dir="ltr"><<a href="mailto:martinvonz@google.com" target="_blank">martinvonz@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Mar 15, 2017 at 9:13 PM, Pulkit Goyal <<a href="mailto:7895pulkit@gmail.com" target="_blank">7895pulkit@gmail.com</a>> wrote:<br>
> # HG changeset patch<br>
> # User Pulkit Goyal <<a href="mailto:7895pulkit@gmail.com" target="_blank">7895pulkit@gmail.com</a>><br>
> # Date 1489635793 -19800<br>
> #      Thu Mar 16 09:13:13 2017 +0530<br>
> # Node ID 63aeb39b5802644ae99eaa5cf0666f<wbr>3bf5cc4e90<br>
> # Parent  b5673a08993652a92c0e20a4e24d84<a href="tel:(219)%20487-2454" value="+12194872454" target="_blank"><wbr>2194872454</a><br>
> commands: make sure using byteschr rather than ascii values<br>
><br>
> 'MAR!?IC' is converted to their ascii values when slicing through it. This<br>
> patch converts them back to bytes string.<br>
><br>
> diff -r b5673a089936 -r 63aeb39b5802 mercurial/commands.py<br>
> --- a/mercurial/commands.py     Thu Mar 16 09:00:27 2017 +0530<br>
> +++ b/mercurial/commands.py     Thu Mar 16 09:13:13 2017 +0530<br>
> @@ -4768,6 +4768,8 @@<br>
>      showchar = not opts.get('no_status')<br>
><br>
>      for state, char, files in changestates:<br>
> +        if pycompat.ispy3:<br>
> +            char = bytes([char])<br>
<br>
</span>I'd prefer to wrap 'MAR!?C' in pycompat.iterbytestr() to avoid the<br>
conditional here. What do you think?. Would that work?</blockquote></div><div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">​I am not sure about how you are saying to that. Using pycompat.iterbytes() we can iterate on 'MAR!?C', but in these we are iterating over three things at once.​</div> </div></div></div></div>
</blockquote></div><br></div></div><div class="gmail_extra" dir="auto">I mean to wrap it in the call to zip, so zip(x, iterbytes(y), z).</div></div>