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

login
register
mail settings
Submitter phabricator
Date Nov. 4, 2017, 7:52 a.m.
Message ID <3651ddb491ed258fac1d8eb6d78f9d03@localhost.localdomain>
Download mbox | patch
Permalink /patch/25388/
State Not Applicable
Headers show

Comments

phabricator - Nov. 4, 2017, 7:52 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3e549546a6e9: py3: handle keyword arguments in hgext/amend.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1295?vs=3232&id=3270

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

AFFECTED FILES
  hgext/amend.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
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))