py3: use pycompat.strkwargs to convert kwargs keys to str
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 26 Feb 2018 16:16:37 +0530
changeset 36464 1fb9e01328e4
parent 36463 433cfad4bc46
child 36465 f449138a52df
py3: use pycompat.strkwargs to convert kwargs keys to str Differential Revision: https://phab.mercurial-scm.org/D2452
mercurial/hgweb/webcommands.py
mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webcommands.py	Mon Feb 26 01:01:35 2018 -0500
+++ b/mercurial/hgweb/webcommands.py	Mon Feb 26 16:16:37 2018 +0530
@@ -151,7 +151,7 @@
                 rename=webutil.renamelink(fctx),
                 permissions=fctx.manifest().flags(f),
                 ishead=int(ishead),
-                **webutil.commonentry(web.repo, fctx))
+                **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)))
 
 @webcommand('file')
 def file(web, req, tmpl):
@@ -284,7 +284,7 @@
                        parity=next(parity),
                        changelogtag=showtags,
                        files=files,
-                       **webutil.commonentry(web.repo, ctx))
+                       **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)))
 
             if count >= revcount:
                 break
@@ -708,7 +708,7 @@
             l.append(tmpl(
                 'shortlogentry',
                 parity=next(parity),
-                **webutil.commonentry(web.repo, ctx)))
+                **pycompat.strkwargs(webutil.commonentry(web.repo, ctx))))
 
         for entry in reversed(l):
             yield entry
@@ -777,7 +777,7 @@
                 symrev=webutil.symrevorshortnode(req, ctx),
                 rename=rename,
                 diff=diffs,
-                **webutil.commonentry(web.repo, ctx))
+                **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)))
 
 diff = webcommand('diff')(filediff)
 
@@ -852,7 +852,7 @@
                 rightrev=rightrev,
                 rightnode=hex(rightnode),
                 comparison=comparison,
-                **webutil.commonentry(web.repo, ctx))
+                **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)))
 
 @webcommand('annotate')
 def annotate(web, req, tmpl):
@@ -943,7 +943,7 @@
                 permissions=fctx.manifest().flags(f),
                 ishead=int(ishead),
                 diffopts=diffopts,
-                **webutil.commonentry(web.repo, fctx))
+                **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)))
 
 @webcommand('filelog')
 def filelog(web, req, tmpl):
@@ -1044,7 +1044,7 @@
                 file=path,
                 diff=diffs,
                 linerange=webutil.formatlinerange(*lr),
-                **webutil.commonentry(repo, c)))
+                **pycompat.strkwargs(webutil.commonentry(repo, c))))
             if i == revcount:
                 break
         lessvars['linerange'] = webutil.formatlinerange(*lrange)
@@ -1061,7 +1061,7 @@
                 file=f,
                 diff=diffs,
                 rename=webutil.renamelink(iterfctx),
-                **webutil.commonentry(repo, iterfctx)))
+                **pycompat.strkwargs(webutil.commonentry(repo, iterfctx))))
         entries.reverse()
         revnav = webutil.filerevnav(web.repo, fctx.path())
         nav = revnav.gen(end - 1, revcount, count)
@@ -1080,7 +1080,7 @@
                 revcount=revcount,
                 morevars=morevars,
                 lessvars=lessvars,
-                **webutil.commonentry(web.repo, fctx))
+                **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)))
 
 @webcommand('archive')
 def archive(web, req, tmpl):
--- a/mercurial/hgweb/webutil.py	Mon Feb 26 01:01:35 2018 -0500
+++ b/mercurial/hgweb/webutil.py	Mon Feb 26 16:16:37 2018 +0530
@@ -449,7 +449,7 @@
         diffsummary=lambda **x: diffsummary(diffstatsgen),
         diffstat=diffstats,
         archives=web.archivelist(ctx.hex()),
-        **commonentry(web.repo, ctx))
+        **pycompat.strkwargs(commonentry(web.repo, ctx)))
 
 def listfilediffs(tmpl, files, node, max):
     for f in files[:max]: