Patchwork D5585: histedit: fix call to _getgoal() by adding a byteskwargs() wrapper

login
register
mail settings
Submitter phabricator
Date Jan. 15, 2019, 4:25 p.m.
Message ID <5979ebc0b96f6fafbb005d2e6d8acf75@localhost.localdomain>
Download mbox | patch
Permalink /patch/37750/
State Not Applicable
Headers show

Comments

phabricator - Jan. 15, 2019, 4:25 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG32ef47b3c91c: histedit: fix call to _getgoal() by adding a byteskwargs() wrapper (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5585?vs=13220&id=13221

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1604,7 +1604,8 @@ 
     # kludge: _chistedit only works for starting an edit, not aborting
     # or continuing, so fall back to regular _texthistedit for those
     # operations.
-    if ui.interface('histedit') == 'curses' and  _getgoal(opts) == goalnew:
+    if ui.interface('histedit') == 'curses' and  _getgoal(
+            pycompat.byteskwargs(opts)) == goalnew:
         return _chistedit(ui, repo, *freeargs, **opts)
     return _texthistedit(ui, repo, *freeargs, **opts)
 
@@ -1621,11 +1622,11 @@ 
 goalnew = 'new'
 
 def _getgoal(opts):
-    if opts.get('continue'):
+    if opts.get(b'continue'):
         return goalcontinue
-    if opts.get('abort'):
+    if opts.get(b'abort'):
         return goalabort
-    if opts.get('edit_plan'):
+    if opts.get(b'edit_plan'):
         return goaleditplan
     return goalnew