Patchwork [05,of,10,py3] changegroup: wrap some ** expansions in strkwargs

login
register
mail settings
Submitter Augie Fackler
Date Aug. 1, 2017, 8:34 p.m.
Message ID <7d68e38eb849015f034a.1501619673@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/22611/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 1, 2017, 8:34 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1500909413 14400
#      Mon Jul 24 11:16:53 2017 -0400
# Node ID 7d68e38eb849015f034a0cbd66990777e635e8f6
# Parent  73208fb1aea975f0d50168860d5bd691cbbad7e7
changegroup: wrap some ** expansions in strkwargs

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -266,7 +266,8 @@  class cg1unpacker(object):
             # 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 @@  class cg1unpacker(object):
                     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