Patchwork D12339: ui: use input() directly

login
register
mail settings
Submitter phabricator
Date March 4, 2022, 3:32 a.m.
Message ID <differential-rev-PHID-DREV-eh246jirybc6rinfgj5z-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50680/
State New
Headers show

Comments

phabricator - March 4, 2022, 3:32 a.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  pycompat.rawinput() is an alias to input()

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12339

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1725,7 +1725,7 @@ 
             if usereadline:
                 self.flush()
                 prompt = encoding.strfromlocal(prompt)
-                line = encoding.strtolocal(pycompat.rawinput(prompt))
+                line = encoding.strtolocal(input(prompt))
                 # When stdin is in binary mode on Windows, it can cause
                 # raw_input() to emit an extra trailing carriage return
                 if pycompat.oslinesep == b'\r\n' and line.endswith(b'\r'):