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

Augie Fackler raf at durin42.com
Tue Aug 1 16:34:33 EDT 2017


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

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


More information about the Mercurial-devel mailing list