py3: don't double-convert "opts" to bytes
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 17 Sep 2019 15:35:16 -0700
changeset 42952 44be33cf7a57
parent 42951 04c6de38734d
child 42954 2c14bf83b58b
py3: don't double-convert "opts" to bytes The "opts" are already converted to bytes at the beginning of the function. Doing it twice results in a crash, which makes test-uncommit.t fail. The extra call was added recently, in ff1ff2aae132 (uncommit: add support to modify the commit message and date, 2019-09-07). test-uncommit.t passes again after this patch. Differential Revision: https://phab.mercurial-scm.org/D6864
hgext/uncommit.py
--- a/hgext/uncommit.py	Tue Sep 17 21:06:07 2019 +0100
+++ b/hgext/uncommit.py	Tue Sep 17 15:35:16 2019 -0700
@@ -177,7 +177,7 @@
         with repo.transaction('uncommit'):
             if not (opts[b'message'] or opts[b'logfile']):
                 opts[b'message'] = old.description()
-            message = cmdutil.logmessage(ui, pycompat.byteskwargs(opts))
+            message = cmdutil.logmessage(ui, opts)
 
             keepcommit = pats
             if not keepcommit: