Patchwork D1318: py3: handle keyword arguments in hgext/histedit.py

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2017, 1:15 p.m.
Message ID <680f8c4bbdf63290778996fa5df95222@localhost.localdomain>
Download mbox | patch
Permalink /patch/25440/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2017, 1:15 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc4b769bc86da: py3: handle keyword arguments in hgext/histedit.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1318?vs=3281&id=3362

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

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -203,6 +203,7 @@ 
     mergeutil,
     node,
     obsolete,
+    pycompat,
     registrar,
     repair,
     scmutil,
@@ -541,9 +542,9 @@ 
     def commitfunc(**kwargs):
         overrides = {('phases', 'new-commit'): phasemin}
         with repo.ui.configoverride(overrides, 'histedit'):
-            extra = kwargs.get('extra', {}).copy()
+            extra = kwargs.get(r'extra', {}).copy()
             extra['histedit_source'] = src.hex()
-            kwargs['extra'] = extra
+            kwargs[r'extra'] = extra
             return repo.commit(**kwargs)
     return commitfunc
 
@@ -1093,6 +1094,7 @@ 
                     _('histedit requires exactly one ancestor revision'))
 
 def _histedit(ui, repo, state, *freeargs, **opts):
+    opts = pycompat.byteskwargs(opts)
     goal = _getgoal(opts)
     revs = opts.get('rev', [])
     rules = opts.get('commands', '')