Patchwork D1295: py3: handle keyword arguments in hgext/amend.py

login
register
mail settings
Submitter phabricator
Date Nov. 2, 2017, 9:14 p.m.
Message ID <differential-rev-PHID-DREV-zwfl7elai56i6lqntzfz-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25360/
State Superseded
Headers show

Comments

phabricator - Nov. 2, 2017, 9:14 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/amend.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/amend.py b/hgext/amend.py
--- a/hgext/amend.py
+++ b/hgext/amend.py
@@ -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))