py3: handle keyword arguments in hgext/amend.py
authorPulkit Goyal <7895pulkit@gmail.com>
Sun, 22 Oct 2017 23:51:57 +0530
changeset 34970 3e549546a6e9
parent 34969 d600bda4a3e1
child 34971 38637dd39cfd
py3: handle keyword arguments in hgext/amend.py Differential Revision: https://phab.mercurial-scm.org/D1295
hgext/amend.py
--- a/hgext/amend.py	Thu Oct 19 23:13:57 2017 +0900
+++ b/hgext/amend.py	Sun Oct 22 23:51:57 2017 +0530
@@ -17,6 +17,7 @@
     cmdutil,
     commands,
     error,
+    pycompat,
     registrar,
 )
 
@@ -46,10 +47,11 @@
 
     See :hg:`help commit` for more details.
     """
+    opts = pycompat.byteskwargs(opts)
     if len(opts['note']) > 255:
         raise error.Abort(_("cannot store a note of more than 255 bytes"))
     with repo.wlock(), repo.lock():
         if not opts.get('logfile'):
             opts['message'] = opts.get('message') or repo['.'].description()
         opts['amend'] = True
-        return commands._docommit(ui, repo, *pats, **opts)
+        return commands._docommit(ui, repo, *pats, **pycompat.strkwargs(opts))