changegroup: wrap some ** expansions in strkwargs
authorAugie Fackler <augie@google.com>
Mon, 24 Jul 2017 11:16:53 -0400
changeset 33671 38fc45721334
parent 33670 e5f8c7baa729
child 33672 da7c285ec6da
changegroup: wrap some ** expansions in strkwargs
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Mon Jul 24 10:21:23 2017 -0400
+++ b/mercurial/changegroup.py	Mon Jul 24 11:16:53 2017 -0400
@@ -266,7 +266,8 @@
             # in this function.
             srctype = tr.hookargs.setdefault('source', srctype)
             url = tr.hookargs.setdefault('url', url)
-            repo.hook('prechangegroup', throw=True, **tr.hookargs)
+            repo.hook('prechangegroup',
+                      throw=True, **pycompat.strkwargs(tr.hookargs))
 
             # write changelog data to temp files so concurrent readers
             # will not see an inconsistent view
@@ -353,7 +354,8 @@
                     hookargs = dict(tr.hookargs)
                     hookargs['node'] = hex(cl.node(clstart))
                     hookargs['node_last'] = hex(cl.node(clend - 1))
-                repo.hook('pretxnchangegroup', throw=True, **hookargs)
+                repo.hook('pretxnchangegroup',
+                          throw=True, **pycompat.strkwargs(hookargs))
 
             added = [cl.node(r) for r in xrange(clstart, clend)]
             phaseall = None