Patchwork D3792: py3: slice over bytes to prevent getting ascii values

login
register
mail settings
Submitter phabricator
Date June 18, 2018, 10:39 a.m.
Message ID <differential-rev-PHID-DREV-zmwt2srycmxcck3nkfow-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32253/
State Superseded
Headers show

Comments

phabricator - June 18, 2018, 10:39 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/transplant.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -523,7 +523,8 @@ 
         displayer.show(repo[node])
         action = None
         while not action:
-            action = 'ynmpcq?'[ui.promptchoice(prompt)]
+            choice = ui.promptchoice(prompt)
+            action = 'ynmpcq?'[choice:choice + 1]
             if action == '?':
                 for c, t in ui.extractchoices(prompt)[1]:
                     ui.write('%s: %s\n' % (c, t))