HomePhabricator

py3: decode prompt string before calling rawinput

Authored by dlax.

Description

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().

Details

Committed
dlaxWed, Oct 9, 9:28 AM
Parents
rHG8ff1ecfadcd1: cleanup: join string literals that are already on one line
Branches
Unknown
Tags
Unknown