py3: handle keyword arguments in hgext/histedit.py
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 23 Oct 2017 00:03:54 +0530
changeset 34999 c4b769bc86da
parent 34998 fc0e6d298cd4
child 35000 135edf120d76
py3: handle keyword arguments in hgext/histedit.py Differential Revision: https://phab.mercurial-scm.org/D1318
hgext/histedit.py
--- a/hgext/histedit.py	Mon Oct 23 00:03:27 2017 +0530
+++ b/hgext/histedit.py	Mon Oct 23 00:03:54 2017 +0530
@@ -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', '')