[Request] [+ ] D10880: amend: work mostly with str-type **opts for simplicity

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Jun 18 21:52:42 UTC 2021


martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/amend.py

CHANGE DETAILS

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



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210618/3b5134ce/attachment.html>


More information about the Mercurial-patches mailing list