Patchwork D9853: histedit: don't assign to _ for unused values

login
register
mail settings
Submitter phabricator
Date Jan. 22, 2021, 8:46 p.m.
Message ID <differential-rev-PHID-DREV-g7mulgyt3is27mmhp6xd-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48164/
State Superseded
Headers show

Comments

phabricator - Jan. 22, 2021, 8:46 p.m.
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I don't know what this ignored value is, but we need to not clobber
  the _() function from gettext, or we get mysterious crashes instead of
  internationalizing some strings in my upcoming patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1615,7 +1615,7 @@ 
     stdscr.refresh()
     while True:
         try:
-            oldmode, _ = state[b'mode']
+            oldmode, unused = state[b'mode']
             if oldmode == MODE_INIT:
                 changemode(state, MODE_RULES)
             e = event(state, ch)
@@ -1630,7 +1630,7 @@ 
                     if size != stdscr.getmaxyx():
                         curses.resizeterm(*size)
 
-                curmode, _ = state[b'mode']
+                curmode, unused = state[b'mode']
                 sizes = layout(curmode)
                 if curmode != oldmode:
                     state[b'page_height'] = sizes[b'main'][0]