mercurial/util.py
branchstable
changeset 33626 524b13fc711f
parent 33549 9a2ee9591acc
child 33650 0b3fe3910ef5
child 33736 86aca74a063b
--- a/mercurial/util.py	Wed Aug 02 22:58:38 2017 +0900
+++ b/mercurial/util.py	Wed Aug 02 22:51:19 2017 +0900
@@ -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