Patchwork [04,of,10] py3: convert kwargs' keys to str using pycompat.strkwargs

login
register
mail settings
Submitter Pulkit Goyal
Date May 4, 2017, 10:46 p.m.
Message ID <2dac09b43b78e59b4035.1493938009@pulkit-goyal>
Download mbox | patch
Permalink /patch/20442/
State Accepted
Headers show

Comments

Pulkit Goyal - May 4, 2017, 10:46 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1493837661 -19800
#      Thu May 04 00:24:21 2017 +0530
# Node ID 2dac09b43b78e59b4035bd8e45374fa8814456af
# Parent  100e7fc11bf088bfa58532680f8917bf3750599f
py3: convert kwargs' keys to str using pycompat.strkwargs
Yuya Nishihara - May 5, 2017, 10:18 a.m.
On Fri, 05 May 2017 04:16:49 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1493837661 -19800
> #      Thu May 04 00:24:21 2017 +0530
> # Node ID 2dac09b43b78e59b4035bd8e45374fa8814456af
> # Parent  100e7fc11bf088bfa58532680f8917bf3750599f
> py3: convert kwargs' keys to str using pycompat.strkwargs
> 
> diff -r 100e7fc11bf0 -r 2dac09b43b78 mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py	Thu May 04 00:23:09 2017 +0530
> +++ b/mercurial/cmdutil.py	Thu May 04 00:24:21 2017 +0530
> @@ -1509,7 +1509,8 @@
>  
>          # write changeset metadata, then patch if requested
>          key = self._parts['changeset']
> -        self.ui.write(templater.stringify(self.t(key, **props)))
> +        self.ui.write(templater.stringify(self.t(key,
> +                                    **pycompat.strkwargs(props))))

We have more **props that should be updated.

Patch

diff -r 100e7fc11bf0 -r 2dac09b43b78 mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Thu May 04 00:23:09 2017 +0530
+++ b/mercurial/cmdutil.py	Thu May 04 00:24:21 2017 +0530
@@ -1509,7 +1509,8 @@ 
 
         # write changeset metadata, then patch if requested
         key = self._parts['changeset']
-        self.ui.write(templater.stringify(self.t(key, **props)))
+        self.ui.write(templater.stringify(self.t(key,
+                                    **pycompat.strkwargs(props))))
         self.showpatch(ctx, matchfn)
 
         if self._parts['footer']: