From patchwork Mon Jun 18 12:33:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D3792: py3: slice over bytes to prevent getting ascii values From: phabricator X-Patchwork-Id: 32266 Message-Id: <8f9ae05a5ee525603d28354f3df03526@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Mon, 18 Jun 2018 12:33:47 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGc7eb9bce6041: py3: slice over bytes to prevent getting ascii values (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3792?vs=9165&id=9176 REVISION DETAIL https://phab.mercurial-scm.org/D3792 AFFECTED FILES hgext/transplant.py mercurial/subrepo.py CHANGE DETAILS To: pulkit, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -1695,7 +1695,7 @@ tab = line.find('\t') if tab == -1: continue - status, f = line[tab - 1], line[tab + 1:] + status, f = line[tab - 1:tab], line[tab + 1:] if status == 'M': modified.append(f) elif status == 'A': 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))