mercurial/util.py
changeset 33736 86aca74a063b
parent 33682 1d5e497c08b3
parent 33626 524b13fc711f
child 33737 02a745c20121
--- a/mercurial/util.py	Wed Aug 02 19:49:57 2017 +0200
+++ b/mercurial/util.py	Thu Aug 10 14:23:41 2017 -0400
@@ -584,6 +584,14 @@
             del self[key]
         super(sortdict, self).__setitem__(key, value)
 
+    if pycompat.ispypy:
+        # __setitem__() isn't called as of PyPy 5.8.0
+        def update(self, src):
+            if isinstance(src, dict):
+                src = src.iteritems()
+            for k, v in src:
+                self[k] = v
+
 @contextlib.contextmanager
 def acceptintervention(tr=None):
     """A context manager that closes the transaction on InterventionRequired