changeset 47427:6ce89165eaa0

amend: work mostly with str-type **opts for simplicity Differential Revision: https://phab.mercurial-scm.org/D10880
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 10 Jun 2021 10:53:43 -0700
parents cac0e0621ceb
children 54849b65dc5f
files hgext/amend.py
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/amend.py	Tue Jun 15 12:34:14 2021 +0200
+++ b/hgext/amend.py	Thu Jun 10 10:53:43 2021 -0700
@@ -66,11 +66,10 @@
 
     See :hg:`help commit` for more details.
     """
-    opts = pycompat.byteskwargs(opts)
-    cmdutil.checknotesize(ui, opts)
+    cmdutil.checknotesize(ui, pycompat.byteskwargs(opts))
 
     with repo.wlock(), repo.lock():
-        if not opts.get(b'logfile'):
-            opts[b'message'] = opts.get(b'message') or repo[b'.'].description()
-        opts[b'amend'] = True
-        return commands._docommit(ui, repo, *pats, **pycompat.strkwargs(opts))
+        if not opts.get('logfile'):
+            opts['message'] = opts.get('message') or repo[b'.'].description()
+        opts['amend'] = True
+        return commands._docommit(ui, repo, *pats, **opts)