[PATCH 1 of 2] py3: decode prompt string before calling rawinput

Pulkit Goyal 7895pulkit at gmail.com
Wed Oct 9 10:26:01 EDT 2019


On Wed, Oct 9, 2019 at 4:38 PM Denis Laxalde <denis at laxalde.org> wrote:
>
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1570627696 -7200
> #      Wed Oct 09 15:28:16 2019 +0200
> # Node ID 99f06850be3ecc521ba461684686865c1191c5a0
> # Parent  1fcf79e9943a17a2e7ae19954b2b5ad5972f8fff
> py3: decode prompt string before calling rawinput
>
> Calling input() (aka pycompat.rawinput() on python3) with a byte string
> displays a byte string in the console. E.g. in interactive commit, we
> get: b"examine changes to '<file>'?\n(enter ? for help) [Ynesfdaq?]".
> Similarly, "hg email" prompts are messed up.
>
> We thus decode the prompt string before running rawinput().

Queued these, many thanks!


More information about the Mercurial-devel mailing list