# HG changeset patch # User Martin von Zweigbergk # Date 2021-06-10 17:53:43 # Node ID 6ce89165eaa0d240bd6e096c0c01e58c2bdb2ba5 # Parent cac0e0621ceb29c5b3202c8788c94ed58adc81c9 amend: work mostly with str-type **opts for simplicity Differential Revision: https://phab.mercurial-scm.org/D10880 diff --git a/hgext/amend.py b/hgext/amend.py --- a/hgext/amend.py +++ b/hgext/amend.py @@ -66,11 +66,10 @@ def amend(ui, repo, *pats, **opts): 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)