D2452: py3: use pycompat.strkwargs to convert kwargs keys to str

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Mon Feb 26 12:31:25 UTC 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/hgweb/webcommands.py
  mercurial/hgweb/webutil.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -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]:
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -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):



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list